Over zealous redefinition of bzero creates portability issues

Martin Pool mbp at samba.org
Mon Jun 16 07:13:56 GMT 2003

On 16 Jun 2003, jra at dp.samba.org wrote:

> AIX too :-). This is why these OS's suck and are dying (like *BSD,
> read /. for details :-). Seriously, bzero is not in spec 1170 and
> shouldn't be used in portable code. Typical of most vendors that
> they do.

I have seen subtle bugs because of people getting the arguments to
memset() the wrong way around, which will not give a warning.  bzero()
nicely avoids this problem and I think it's far better for that
reason, and anyhow, it's easy to implement on systems that are missing

I guess something like ZERO_STRUCT is adequate though.


More information about the samba-technical mailing list