Hacker News new | ask | show | jobs
by pizza234 2002 days ago
I spent to some time to check and analyze the code.

The author uses it in a clear pattern, specifically, as a sibiling post mentions, in order to achieve error handling (additionally, with fall-through); the labels are indeed neatly placed at the end of the function, after the `ret` exit.

The problem is consistency - the upper half of that function performs error handling without goto, and the lower half with it.

I personally prefer all-or-none solutions, since I highly value consistency, but on the other hand, I do consider this solution acceptable, since it still has a tidy (enough) structure.