fixes for host gcc 4.6.1
[zpugcc/jano.git] / toolchain / gcc / newlib / libc / string / bzero.c
blob661285f7b42b6465d1ba2648ba64a58ed75d6e44
1 /*
2 FUNCTION
3 <<bzero>>---initialize memory to zero
5 INDEX
6 bzero
8 ANSI_SYNOPSIS
9 #include <string.h>
10 void bzero(void *<[b]>, size_t <[length]>);
12 TRAD_SYNOPSIS
13 #include <string.h>
14 void bzero(<[b]>, <[length]>)
15 void *<[b]>;
16 size_t <[length]>;
18 DESCRIPTION
19 <<bzero>> initializes <[length]> bytes of memory, starting at address
20 <[b]>, to zero.
22 RETURNS
23 <<bzero>> does not return a result.
25 PORTABILITY
26 <<bzero>> is in the Berkeley Software Distribution.
27 Neither ANSI C nor the System V Interface Definition (Issue 2) require
28 <<bzero>>.
30 <<bzero>> requires no supporting OS subroutines.
33 #include <string.h>
35 _VOID
36 _DEFUN (bzero, (b, length),
37 void *b _AND
38 size_t length)
40 char *ptr = (char *)b;
41 while (length--)
42 *ptr++ = 0;