[FoRK] Re: gotos was: open source awareness [etc]

Robert Harley robert.harley at gmail.com
Fri May 20 15:06:45 PDT 2005


>[...]
 >     goto out;
>
>[...]
>      goto out_close_h;
>
>[...]
>      goto out_close_hfm;
>
>[...]
>      goto out_unmap_pv;
>
>    fRc = TRUE;
>
>  out_unmap_pv:
>    UnmapViewOfFile(pv);
>  out_close_hfm:
>    CloseHandle(hfm);
>  out_close_h:
>    CloseHandle(h);
>  out:
>    return fRc;
>  }
>
>[...]
>FWIW, I agree with him, and commonly use this goto pattern.

Err..., I wasn't aware that this style had a following but it is
uncannily like what I use.
Either I'm copying, or everyone else is, or it just makes sense.

R


More information about the FoRK mailing list