[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: build failures from gcc warning about memset
From: |
Andy Wingo |
Subject: |
Re: build failures from gcc warning about memset |
Date: |
Sun, 25 Oct 2009 23:04:48 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.0.92 (gnu/linux) |
Hi Julian,
On Sun 25 Oct 2009 18:16, Julian Graham <address@hidden> writes:
> --- 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;
> }
Actually scm_gc_malloc will give you back a zeroed array, afaik, as
GC_malloc does. The patch looks fine but if we can rely on
scm_gc_malloc's new behavior, we don't need the memset at all.
Thoughts from Ludovic would be nice :)
A
--
http://wingolog.org/