DragonFly BSD
DragonFly submit List (threaded) for 2004-03
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: style(9) sweep on config(8)


From: Chris Pressey <cpressey@xxxxxxxxxxxxxxx>
Date: Thu, 4 Mar 2004 20:22:05 -0800

On Thu, 4 Mar 2004 19:04:56 -0800 (PST)
Matthew Dillon <dillon@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



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]