Though, admittedly, I don't think I've ever looked at a piece of code I've written that was more than six months old without thinking "who the hell did this and why did they want to torture me?"
Though, admittedly, I don't think I've ever looked at a piece of code I've written that was more than six months old without thinking "who the hell did this and why did they want to torture me?"
Please tell me you're joking.
Otherwise, we may as well just do: "on error resume next :-)"
The gotos are necessary because kernel work requires allocating resources. If an error is hit, the function needs to exit, but it also needs to release its resources correctly. But, these resources need to be freed upon normal completion as well. Hence, gotos.
You should probably read some of the code before saying it's bad. See, for example, the function that implements a memory map: http://miller.cs.wm.edu/lxr3.linux/http/source/mm/mmap.c?v=2...
Again, I'm not seeing any specific need.