On Tue, 21 Sep 2010 at 13:46:16 +0200, Tamas TEVESZ wrote:
> On Tue, 21 Sep 2010, Carlos R. Mafra wrote:
> 
>  > > diff --git a/WINGs/memory.c b/WINGs/memory.c
>  > > index 9d770b0..bb6df5c 100644
>  > > --- a/WINGs/memory.c
>  > > +++ b/WINGs/memory.c
>  > > @@ -95,6 +95,7 @@ void *wmalloc(size_t size)
>  > >                         }
>  > >                 }
>  > >         }
>  > > +       memset(tmp, 0, size);
>  > >         return tmp;
>  > >  }
>  > 
>  > Hm, I'd rather keep them separate and fix the omissions.
> 
> but why? there are a hundred-plus places with separate memset(0) calls 
> after w?malloc, and god knows how many where the intent is expressed 
> in variations of *p = '\0' (these forms i'm not really fond of, but i 
> may be overly cautious).

I have no strong opinion (not that I should have in the first place).

My first impression is that it tries to workaround mistakes in the code,
but it may not be the case here. Have you spotted places with missing
memset()'s?

Or you just want to remove lots of memset() throughout the code? (which
may be a good thing, I dunno). I haven't grep'ed anything, so I don't 
know the status quo.



-- 
To unsubscribe, send mail to [email protected].

Reply via email to