Laurent Gauch wrote: >> Please just use goto to handle errors. > > /*When we talk coding style with students, the first comment I have is : > DO NEVER USE GOTO STATEMENT BUT USE IF ELSE IF ...
I'm afraid that's not only doing your students a disservice, but also their future employers. > Sometimes goto is still used in complicated function to simplify > the jump ... But the better should be to split your complicated > function in sub functions ... Creating sub functions is a good workaround in languages where goto is missing, but in C that is not the case. Again; please just use goto to handle errors. Have a look at the Linux kernel, they do this well over there. //Peter _______________________________________________ Openocd-development mailing list Openocd-development@lists.berlios.de https://lists.berlios.de/mailman/listinfo/openocd-development