|
|
|
|
|
by wildmusings
3007 days ago
|
|
Goto is heavily used to return early, by jumping to the cleanup section at the bottom of the function. Otherwise, you have to repeat the cleanup code at each exit point, or use the dreaded pyramid of doom where each failure point introduces another indent level, which is what the author here is trying to avoid in the first place. |
|
Only by doing multiple things in one function you really need to use goto's in C. (again, as far I can judge coding in C, not an expert!)