Jerry Van Baren wrote:

> Just in case Wolfgang was too terse, I'll add to his critique... the 
> original code is the origin of the coding violations:
> 
> void usb_stor_info(void)
> {
>          int i;
> 
>          if (usb_max_devs > 0)
>                  for (i = 0; i < usb_max_devs; i++) {
>                          printf ("  Device %d: ", i);
>                          dev_print(&usb_dev_desc[i]);
>                  }
>          else
>                  printf("No storage devices, perhaps not 'usb 
> start'ed..?\n");
> }
> 
> It doesn't have braces on the "if (usb_max_devs > 0)" which is 
> syntactically OK but the source of the coding violation.  Please add 
> braces after the "if" and "} else {" per Wolfgang's comments.
> 
> Thanks for making the code a little better and a little prettier, ;-)
> gvb
> 


Hey Stefan,

What do you think?  Wouldn't a policy of _always_ using
braces even for single sub-statements have just made this
a _correct_ no-brainer from the onset? :-)

jdl

PS -- No, no point.  Why do you ask?

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users

Reply via email to