diff --git a/modules/src/string/btszero.c b/modules/src/string/btszero.c index e36074a97..dfdfcb650 100644 --- a/modules/src/string/btszero.c +++ b/modules/src/string/btszero.c @@ -8,9 +8,13 @@ char * btszero(b, n) - register char *b; + char *b; register int n; { + register char *s = b; + while (n-- > 0) - *b++ = '\0'; + *s++ = '\0'; + + return b; } diff --git a/modules/src/string/strzero.c b/modules/src/string/strzero.c index a9bbed1a4..f122cc579 100644 --- a/modules/src/string/strzero.c +++ b/modules/src/string/strzero.c @@ -11,4 +11,5 @@ strzero(s) char *s; { *s = '\0'; + return s; }