HAL APM anti-goto-ification.

David Zeuthen david at fubar.dk
Tue Nov 15 13:51:19 PST 2005


On Tue, 2005-11-15 at 21:49 +0000, Richard Hughes wrote:
> Now 0.5.5 has been released, I've a few patches that have been sitting
> in my local tree for a while.
> 
> This small patch just replaces the goto jumps with returns in apm.c,
> saving many ret variables (and saving my eyes from bleeding every time I
> look at the file...)
> 
> Good to commit?

No. You appear to be suffering from the gotos-are-evil syndrom. Keep in
mind that in C most people consider goto elegant in terms of error
handling plus it makes it possible to actually follow the "you enter a
function one place - you exit a function one place" paradigm.

    David




More information about the hal mailing list