[OPEN-ILS-DEV] Re: PATCH: bzero is deprecated and unnecessary
David J. Fiander
djfiander at fastmail.fm
Sun Sep 30 10:53:07 EDT 2007
>
> First, I wouldn't initialize the buffer with nuls. I'd initialize it
> with (for example) exclamation points, with perhaps a nul at the end.
> That way if a wayward pointer gives us a string of exclamation points,
> we'll have a better chance of recognizing the problem. A string of
> nuls is neither distinctive nor informative.
>
I agree. A long time ago I used to use a debugging malloc library
that filled the buffers returned with '\001' bytes. It's amazing how
many bugs one finds that way.
- David
--
David J. Fiander
Digital Services Librarian
More information about the Open-ils-dev
mailing list