[PATCH] Fix a crash during isimodem initialization

Denis Kenzior denkenz at gmail.com
Thu Dec 10 06:34:17 PST 2009


Hi Alex,

> > We're very pedantic about spacing and blank lines here.  There should be
> > no extraneous blank spaces in the code.  And all if statements must be
> > preceded by a blank line.
>
> Right. Is this documented anywhere, particularly the "blank line before if"
> rule?

Most of the conventions are directly from 
/usr/src/linux/Documentation/CodingStyle.  The blank line before if 
requirement is more of an internal convention.  Just follow what the existing 
code does and you'll be alright.

However, in general the if must be preceded by a blank line, UNLESS the if is 
nested and not preceded by an expression or variable declaration.  The 
following form is also acceptable:

foo = malloc();
if (foo == NULL)
	return;

If in doubt, check what the existing code does.  The maintainer has the final 
say.

Regards,
-Denis


More information about the ofono mailing list