Coding style updates

Gerald (Jerry) Carter jerry at samba.org
Sun Oct 21 18:49:11 GMT 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Jelmer Vernooij wrote:

>> - -1.  We had this discussion before as well.  Mainly I don't
>> like the "this one *or* that one".  Pick one.  We previously
>> decided on if ((x=malloc) == NULL) format.
> This seems inconsistent. If you favor "if (ptr)" over "if (ptr !=
> NULL)", it should also be "if (!(x=malloc(...)))".

True.  But that was the original discussion.  I can be convinced
but I don't think having two ways to check for NULL pointer
assignment is a good idea.  So you guys decide which one we go with.

The argument for "if ((x=malloc) == NULL" was that it was clearer
about what you intended to check.  And "if (!x)" is already clear
enough.






cheers, jerry
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHG4MpIR7qMdg1EfYRAm2pAJ9D5qdslWhcfjgxoWlQP5c8fekSvgCcCPU+
tPfnA8XwnK3dtLQsYQy/K6k=
=wJN/
-----END PGP SIGNATURE-----


More information about the samba-technical mailing list