1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-20 03:30:27 +02:00

Resolve warning in gcc-4.3 about transposed parameters passed to memset

* libguile/gc-malloc.c (scm_gc_calloc): Add explicit check on size parameter

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
This commit is contained in:
Julian Graham 2009-10-25 13:00:08 -04:00 committed by Ludovic Courtès
parent 5565279a67
commit 9a9e0d6d5e

View file

@ -206,7 +206,8 @@ void *
scm_gc_calloc (size_t size, const char *what)
{
void *ptr = scm_gc_malloc (size, what);
memset (ptr, 0x0, size);
if (size)
memset (ptr, 0x0, size);
return ptr;
}