Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Johnston <jjohnstn@redhat.com>2002-05-23 22:46:04 +0400
committerJeff Johnston <jjohnstn@redhat.com>2002-05-23 22:46:04 +0400
commitafe56517950e244cb8943611c0223c6d7adb7d35 (patch)
tree06bc3d4072f127c3d381a9648bf57bb57feb3451 /newlib/libc/string/bzero.c
parent70781754743755b45a7b10c07fadf92afea26b53 (diff)
2002-05-23 Jeff Johnston <jjohnstn@redhat.com>
* 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.
Diffstat (limited to 'newlib/libc/string/bzero.c')
-rw-r--r--newlib/libc/string/bzero.c9
1 files changed, 5 insertions, 4 deletions
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 <string.h>
- void bzero(char *<[b]>, size_t <[length]>);
+ void bzero(void *<[b]>, size_t <[length]>);
TRAD_SYNOPSIS
#include <string.h>
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;
}