diff options
author | Julian Graham <julian.graham@aya.yale.edu> | 2009-10-25 13:00:08 -0400 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2009-10-25 23:01:07 +0100 |
commit | 9a9e0d6d5e70ecf959bcedf6e172e569c5339d17 (patch) | |
tree | 9a7c0e31bb39928d9a3d0794ae6fb878e7be6085 /libguile/gc-malloc.c | |
parent | 5565279a67f9c0da5888273c5904b1b69d021522 (diff) | |
download | guile-9a9e0d6d5e70ecf959bcedf6e172e569c5339d17.tar.gz |
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>
Diffstat (limited to 'libguile/gc-malloc.c')
-rw-r--r-- | libguile/gc-malloc.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libguile/gc-malloc.c b/libguile/gc-malloc.c index a96a186bc..0e60ebade 100644 --- a/libguile/gc-malloc.c +++ b/libguile/gc-malloc.c @@ -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; } |