summaryrefslogtreecommitdiff
path: root/libiberty/bzero.c
diff options
context:
space:
mode:
authorDJ Delorie <dj@redhat.com>2005-04-03 04:41:10 +0000
committerDJ Delorie <dj@redhat.com>2005-04-03 04:41:10 +0000
commit14a88c496bef288d66f245d1d07c7bfa7f6062fb (patch)
treead4d2c6176db68eb7d06ff8fb67d55395c581e49 /libiberty/bzero.c
parent26dae57f146e8b7d546a90c4317389281eb879e7 (diff)
downloadbinutils-gdb-14a88c496bef288d66f245d1d07c7bfa7f6062fb.tar.gz
merge from gcc
Diffstat (limited to 'libiberty/bzero.c')
-rw-r--r--libiberty/bzero.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/libiberty/bzero.c b/libiberty/bzero.c
index 1f52d2d3098..44ad73da4d6 100644
--- a/libiberty/bzero.c
+++ b/libiberty/bzero.c
@@ -12,12 +12,12 @@ is deprecated in favor of @code{memset}.
*/
+#include <stddef.h>
+
+extern void *memset(void *, int, size_t);
void
-bzero (char *to, int count)
+bzero (void *to, size_t count)
{
- while (count-- > 0)
- {
- *to++ = 0;
- }
+ memset (to, 0, count);
}