From 8892bb3625a1f91f121fd98763a82c2cb0c0f67a Mon Sep 17 00:00:00 2001 From: Lukas Fleischer Date: Sun, 19 Feb 2012 01:19:48 +0100 Subject: Remove all usages of bzero() and bcopy() The bzero() and bcopy() functions are deprecated and were removed from the POSIX standard in IEEE Std. 1003.1-2008. Remove all usages of bzero()/bcopy() and replace them by appropriate memset()/memmove() calls. Signed-off-by: Lukas Fleischer --- src/mem.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/mem.c') diff --git a/src/mem.c b/src/mem.c index 01fb010..8a7271d 100644 --- a/src/mem.c +++ b/src/mem.c @@ -205,7 +205,7 @@ dbg_calloc (size_t nmemb, size_t size, const char *pos) if ((buf = dbg_malloc (size, pos)) == NULL) return NULL; - bzero (buf, size); + memset (buf, 0, size); return buf; } @@ -229,7 +229,7 @@ dbg_realloc (void *ptr, size_t nmemb, size_t size, const char *pos) old_size = *((unsigned *)ptr - EXTRA_SPACE_START + BLK_SIZE); cpy_size = (old_size > new_size) ? new_size : old_size; - bcopy (ptr, buf, cpy_size); + memmove (buf, ptr, cpy_size); mem_free (ptr); -- cgit v1.2.3-54-g00ecf