[SCM] Samba Shared Repository - branch master updated

David Disseldorp ddiss at suse.de
Wed May 30 03:25:59 MDT 2012


On Wed, 30 May 2012 07:59:22 +0200
Volker Lendecke <Volker.Lendecke at SerNet.DE> wrote:

> Doing a return or
> goto from something that looks like a function call is just
> wrong to me. To save precious screen space, I would rather
> go and introduce a special rule to say
> 
> if (ptr == NULL) { return WERR_NOMEM };
> 
> in one line. I know we have tons of uses of those, but I
> would like to start a discussion about banning them.

+1 from me, macros that effect control flow are evil IMO.

My preference would be to use a two line if statement:
if (ptr == NULL)
	 return WERR_NOMEM;

Cheers, David


More information about the samba-technical mailing list