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

Mike Rylander mrylander at gmail.com
Sun Sep 30 22:51:35 EDT 2007


On 9/30/07, Dan Scott <denials at gmail.com> wrote:
> 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!
>

I also go an "okay" from Bill via IRC, so I'm committing now.

-- 
Mike Rylander
 | VP, Research and Design
 | Equinox Software, Inc. / The Evergreen Experts
 | phone:  1-877-OPEN-ILS (673-6457)
 | email:  miker at esilibrary.com
 | web:  http://www.esilibrary.com


More information about the Open-ils-dev mailing list