[OPEN-ILS-DEV] Re: PATCH: bzero is deprecated and unnecessary

Dan Scott denials at gmail.com
Sun Sep 30 22:01:25 EDT 2007


On 30/09/2007, Mike Rylander <mrylander at gmail.com> wrote:
> On 9/30/07, Scott McKellar <mck9 at swbell.net> wrote:
<snip>
> > Sorry, that was my mistake.  In my original proposal, temp_s should
> > have been declared as char *, not void *.  The memset works with a
> > void *, but the indexing on the next line doesn't -- you can't
> > dereference a void pointer.
> >
> > I tested the revised version with a little Hello World program.
> > With the char * instead of a void * on the temporary, it compiled
> > and ran just fine.
> >
> > That'll teach me not to post untested code.  (Well, actually, it
> > probably won't.)
> >
> > It's worth a little extra trouble to make the macro safer.
> >
>
> So it is written, so it shall be done (though, after you jogged my
> memory, I reailzed could just cast to a char*).  Thanks, Scott.
>
> Anything else?  Are we ready to let mayhem ensue by committing and
> collectively compiling with -DNDEBUG ?

The patch looks pretty solid to me. Unleash the mayhem!

-- 
Dan Scott
Laurentian University


More information about the Open-ils-dev mailing list