X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=libiberty%2Fbzero.c;h=44ad73da4d6e956cd012fc4de3ddc32b8a37f1ec;hb=5f8989944880cad1bfffab3801214a0a9b67b72e;hp=d01644b7f4b8a4ed1317490d6531d97a5225c70b;hpb=30727aa6d12fb866494020c0b62ab265a2bdcdfe;p=deliverable%2Fbinutils-gdb.git diff --git a/libiberty/bzero.c b/libiberty/bzero.c index d01644b7f4..44ad73da4d 100644 --- a/libiberty/bzero.c +++ b/libiberty/bzero.c @@ -2,30 +2,22 @@ This function is in the public domain. */ /* -NAME - bzero -- zero the contents of a specified memory region -SYNOPSIS - void bzero (char *to, int count) +@deftypefn Supplemental void bzero (char *@var{mem}, int @var{count}) -DESCRIPTION - Zero COUNT bytes of memory pointed to by TO. +Zeros @var{count} bytes starting at @var{mem}. Use of this function +is deprecated in favor of @code{memset}. -BUGS - Significant speed enhancements may be made in some environments - by zeroing more than a single byte at a time, or by unrolling the - loop. +@end deftypefn */ +#include + +extern void *memset(void *, int, size_t); void -bzero (to, count) - char *to; - int count; +bzero (void *to, size_t count) { - while (count-- > 0) - { - *to++ = 0; - } + memset (to, 0, count); }