Messages in this thread | | | Date | Fri, 2 Mar 2001 15:31:17 +0100 | From | "J . A . Magallon" <> | Subject | Re: [OT] style-curiosity |
| |
On 03.02 Tigran Aivazian wrote: > On Fri, 2 Mar 2001, J . A . Magallon wrote: > > for (c = misc_list.next; c != &misc_list; c = c->next) > > { > > if (c->minor == misc->minor) { > > up(&misc_sem); > > return -EBUSY; > > } > > } > > the above is good but the below is better: > > for (c = misc_list.next; c != &misc_list; c = c->next) > if (c->minor == misc->minor) { > up(&misc_sem); > return -EBUSY; > } >
I have suffered so many bugs coming from bad grouping that I always put the braces even if they are not needed.
-- J.A. Magallon $> cd pub mailto:jamagallon@able.es $> more beer
Linux werewolf 2.4.2-ac8 #2 SMP Fri Mar 2 12:12:45 CET 2001 i686
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |