style(9) sweep on config(8)

Chris Pressey cpressey at catseye.mine.nu
Thu Mar 4 20:18:12 PST 2004


On Thu, 4 Mar 2004 19:04:56 -0800 (PST)
Matthew Dillon <dillon at xxxxxxxxxxxxxxxxxxxx> wrote:

> 
>     Using bzero() is just fine.  In fact, I prefer it over both
>     calloc() and memset().
> 
>     The reason why bzero() is still used by many people is simply
>     because it has a superior API to memset() for zeroing memory.
>     Many people get annoyed at having to specify the extra arg
>     in memset() just to zero memory and many people also hate
>     calloc() for the same reason (and the extra unnecessary multiply
>     that calloc() has to do).
> 
> 					-Matt

Off-topic aside: it's vaguely interesting to note how this is mirrored
in natural language.  I can say "I'm zeroing the array", but I can't say
"I'm fifty-sevening the array", I have to say "I'm filling the array
with fifty-sevens."  IOW, bzero is like the verb "zero", and memset is
like the verb "fill".

But that's neither here nor there... :)

-Chris





More information about the Submit mailing list