From afe56517950e244cb8943611c0223c6d7adb7d35 Mon Sep 17 00:00:00 2001 From: Jeff Johnston Date: Thu, 23 May 2002 18:46:04 +0000 Subject: 2002-05-23 Jeff Johnston * libc/include/string.h (bcmp, bcopy, bzero): Change prototypes to use void * pointers and comply with Single Unix spec. * libc/string/bcmp.c: Change to use void * instead of char *. * libc/string/bcopy.c: Ditto. * libc/string/bzero.c: Ditto. --- newlib/libc/string/bzero.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'newlib/libc/string/bzero.c') diff --git a/newlib/libc/string/bzero.c b/newlib/libc/string/bzero.c index e9e78c938..661285f7b 100644 --- a/newlib/libc/string/bzero.c +++ b/newlib/libc/string/bzero.c @@ -7,12 +7,12 @@ INDEX ANSI_SYNOPSIS #include - void bzero(char *<[b]>, size_t <[length]>); + void bzero(void *<[b]>, size_t <[length]>); TRAD_SYNOPSIS #include void bzero(<[b]>, <[length]>) - char *<[b]>; + void *<[b]>; size_t <[length]>; DESCRIPTION @@ -34,9 +34,10 @@ Neither ANSI C nor the System V Interface Definition (Issue 2) require _VOID _DEFUN (bzero, (b, length), - char *b _AND + void *b _AND size_t length) { + char *ptr = (char *)b; while (length--) - *b++ = 0; + *ptr++ = 0; } -- cgit v1.2.3