From e98e8717be49a11ba4026989688c48a579cf7003 Mon Sep 17 00:00:00 2001 From: ceriel Date: Wed, 16 Oct 1991 11:41:33 +0000 Subject: [PATCH] Return values --- modules/src/string/btszero.c | 8 ++++++-- modules/src/string/strzero.c | 1 + 2 files changed, 7 insertions(+), 2 deletions(-) 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; }