Re: [patch]clarification of coding style regarding conditional statements with two branches

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Jiri Slaby <jirislaby@...>
Cc: Oliver Neukum <oliver@...>, <linux-kernel@...>
Date: Friday, May 4, 2007 - 12:16 pm

Jiri Slaby <jirislaby@gmail.com> writes:


I think so. And it means less lines #.


Exception:

if (x) {
	if (y)
		foo1();
	else
		foo2();
} else
	bar();

The braces after if(x) are needed so nobody thinks it's:

if (x)
	if (y)
		foo1();
else
	foo2();
else
	bar();

-- 
Krzysztof Halasa
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [patch]clarification of coding style regarding condition..., Krzysztof Halasa, (Fri May 4, 12:16 pm)