style(9) sweep on config(8)

Chris Pressey cpressey at catseye.mine.nu
Thu Mar 4 18:56:17 PST 2004


On Thu, 04 Mar 2004 19:41:21 -0600
Robert Garrett <rg70 at xxxxxxxxxxxxx> wrote:

> Robert Garrett wrote:
> > Joerg Sonnenberger wrote:
> > 
> >> On Thu, Mar 04, 2004 at 07:04:04PM -0500, Dave Cuthbert wrote:
> >>
> >>> Chris Pressey wrote:
> >>>
> >>>>     o  Use memset(ptr, 0, size) instead of bzero(ptr, size)
> >>>
> >>>
> >>> Is there a reason why uses of bzero() should be changed to
> >memset()?>
> >>
> >>
> >> For the kernel, using bzero is fine. For the userland bzero is BSD
> >> specific function, while memset is ISO C89.
> >>
> >> For timing, they should ~identical.
> >>
> >> Joerg
> >>
> >>
> >>> Dave
> > 
> > minus an extra call and return pair, memset is a special case of
> > bzero,

You mean, bzero is a special case of memset ;)
That is, from the *programmer's* point of view anyway.

If it's really a contentious issue, I can redo the patch with calloc
instead of malloc, which would (I think) obviate the need for both
bzero and memset.

-Chris





More information about the Submit mailing list