projects
/
platform
/
upstream
/
binutils.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[MIPS] When calculating a relocation using an undefined weak symbol don't check for...
[platform/upstream/binutils.git]
/
libiberty
/
bzero.c
diff --git
a/libiberty/bzero.c
b/libiberty/bzero.c
index
d01644b
..
44ad73d
100644
(file)
--- a/
libiberty/bzero.c
+++ b/
libiberty/bzero.c
@@
-2,30
+2,22
@@
This function is in the public domain. */
/*
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 <stddef.h>
+
+extern void *memset(void *, int, size_t);
void
void
-bzero (to, count)
- char *to;
- int count;
+bzero (void *to, size_t count)
{
{
- while (count-- > 0)
- {
- *to++ = 0;
- }
+ memset (to, 0, count);
}
}