[PATCH 2/2] Initialize all of datahead structure in nscd [BZ #16791]

Mike Frysinger vapier@gentoo.org
Wed Apr 2 09:33:00 GMT 2014


On Wed 02 Apr 2014 10:23:55 Siddhesh Poyarekar wrote:
> On Tue, Apr 01, 2014 at 11:26:16AM -0700, Roland McGrath wrote:
> > If you bzero before explicitly filling fields, does the compiler optimize
> > to only zeroing the one unused field?  If so, that seems more futureproof.
> 
> It doesn't quite, but (now that I checked) it really only results in a
> couple of additional instructions (as opposed to a function call that
> I had implicitly assumed), so I'll add it anyway if you think it is
> OK.  This obviously also needs the previous patch that consolidates
> the head initialization code.

as a general thing, can we not use bzero ?  like ever ?  memset should be 
exactly the same.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20140402/8c9e6790/attachment.sig>


More information about the Libc-alpha mailing list