Coding style updates

Guenther Deschner gd at samba.org
Fri Oct 19 11:26:31 GMT 2007


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

Stefan (metze) Metzmacher wrote:
> Jelmer Vernooij schrieb:
>> Am Freitag, den 19.10.2007, 10:39 +0200 schrieb Stefan (metze) Metzmacher:
>>> +
>>> +These should only be use together with return, goto, exit() or free():
>>> +
>>> +	if (x == 1) return 0;
>>> +
>>> +	if (some_long_function_name_check(x))
>>> +		goto failed;
>>> +
>>> +	if (ptr) free(ptr);
>>> +
>> I prefer an explicit "!= NULL" in the expression when checking a pointer
> I think both (ptr) and (ptr != NULL) are fine

Yes, me too. Actually I prefer if (!ptr). But both are good.

For all other changes: +1

Guenther

- --
Günther Deschner                    GPG-ID: 8EE11688
Red Hat                         gdeschner at redhat.com
Samba Team                              gd at samba.org
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iD8DBQFHGJRnSOk3aI7hFogRAmtJAJ9JF3ehpTLNpfk69mpKvmBQ0GWizgCePu5C
aKy/hGNMVQKNZkSJYRLN/vQ=
=hzqU
-----END PGP SIGNATURE-----


More information about the samba-technical mailing list