[U-Boot] [PATCH 08/10] OMAP3 zoom2 Use usbtty if the debug board is not connected.

Mike Frysinger vapier at gentoo.org
Sun Nov 1 14:33:59 CET 2009


On Saturday 31 October 2009 22:03:45 Tom wrote:
> Mike Frysinger wrote:
> > On Saturday 31 October 2009 13:37:45 Tom Rix wrote:
> >> +	} else {
> >> +		usbtty_putc(c);
> >>  	}
> >
> > dont need those braces (same goes for a few other hunks here)
> > -mike
> 
> This is done because if-statement above use braces.
> If this was a simple
> if (foo)
> 	smt_1
> else
> 	smt_2
> 
> I would have not use braces.

the trailing "else" clause is one statement.  the relationship to the previous 
if section doesnt matter.  common style convention is:
if (foo) {
	statement_1;
	statement_2;
} else
	statement_3;
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20091101/ed54e9f0/attachment.pgp 


More information about the U-Boot mailing list