diff options
author | Ludovic Courtès <ludo@gnu.org> | 2009-10-26 10:25:38 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2009-10-26 10:25:38 +0100 |
commit | b1f6293e98768f1efedde848520812fc97dea294 (patch) | |
tree | 20727f0e18a36e6c1c71d3a59efdc41961c08ad3 /libguile/gc-malloc.c | |
parent | 9a9e0d6d5e70ecf959bcedf6e172e569c5339d17 (diff) |
Don't use memset(3) after `GC_MALLOC ()' calls.
* libguile/gc-malloc.c (scm_gc_calloc): Don't use memset(3) as it's not
needed. Reported by Andy Wingo.
Diffstat (limited to 'libguile/gc-malloc.c')
-rw-r--r-- | libguile/gc-malloc.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/libguile/gc-malloc.c b/libguile/gc-malloc.c index 0e60ebade..669f7894b 100644 --- a/libguile/gc-malloc.c +++ b/libguile/gc-malloc.c @@ -205,10 +205,8 @@ scm_gc_malloc (size_t size, const char *what) void * scm_gc_calloc (size_t size, const char *what) { - void *ptr = scm_gc_malloc (size, what); - if (size) - memset (ptr, 0x0, size); - return ptr; + /* `GC_MALLOC ()' always returns a zeroed buffer. */ + return scm_gc_malloc (size, what); } |