On Mon, 04 Jun 2007 10:43:51 PDT, "H. Peter Anvin" said: > Jan Engelhardt wrote: > > But gotos are special. ("Evil" minus the "it's good for unrolling in case of an > > error" case). > So? > > You still want them to be associated with the level the bailout happens at. No, you want them associated with the level you bail out *TO*. Otherwise you get this: ... ... if (..) { if (..) { goto ka_blammo; ... foo = yadda_yadda(.....); kfree(bar->some_struct); ka_blammo: /* continue with cleanup here */ Goto labels belong in column 1. Or 2 if you believe in the existence of 'diff -p' that get confused by col-1 labels.
Attachment:
pgpc4xWoIDkKf.pgp
Description: PGP signature
- Follow-Ups:
- Re: [RFC] Documentation/CodingStyle: Add rules for goto labels
- From: "H. Peter Anvin" <[email protected]>
- Re: [RFC] Documentation/CodingStyle: Add rules for goto labels
- References:
- [RFC] Documentation/CodingStyle: Add rules for goto labels
- From: WANG Cong <[email protected]>
- Re: [RFC] Documentation/CodingStyle: Add rules for goto labels
- From: Al Viro <[email protected]>
- Re: [RFC] Documentation/CodingStyle: Add rules for goto labels
- From: Randy Dunlap <[email protected]>
- Re: [RFC] Documentation/CodingStyle: Add rules for goto labels
- From: Jeff Garzik <[email protected]>
- Re: [RFC] Documentation/CodingStyle: Add rules for goto labels
- From: "H. Peter Anvin" <[email protected]>
- Re: [RFC] Documentation/CodingStyle: Add rules for goto labels
- From: Jan Engelhardt <[email protected]>
- Re: [RFC] Documentation/CodingStyle: Add rules for goto labels
- From: "H. Peter Anvin" <[email protected]>
- [RFC] Documentation/CodingStyle: Add rules for goto labels
- Prev by Date: Re: Interesting interaction between lguest and CFS
- Next by Date: Re: [patch 1/2] ufd v1 - unsequential O(1) fdmap core
- Previous by thread: Re: [RFC] Documentation/CodingStyle: Add rules for goto labels
- Next by thread: Re: [RFC] Documentation/CodingStyle: Add rules for goto labels
- Index(es):