Il 28/09/2012 12:52, Laszlo Ersek ha scritto: > Normally I like explicit error checking, but: > - Due to the many PCI accesses, VirtioBlkInit() is quite linear, already > pretty long, and not really splittable. I introduced the above macros > partially in order to save repeating the error checking if/goto over and > over. (My personal style would forbid goto altogether and prescribe me > to use nested "if"s, but you would definitely refuse a sixfold nested > function.) > - It's impossible to misuse this macro, because the "goto" requires a > label, and labels have a separate namespace in C (and you can only jump > within a function).
What about moving the part of VirtioBlkInit that uses the macro to a separate function, so that the goto can be replaced by an anticipated "return"? Then you avoid the six nested ifs. Paolo ------------------------------------------------------------------------------ How fast is your code? 3 out of 4 devs don\\\'t know how their code performs in production. Find out how slow your code is with AppDynamics Lite. http://ad.doubleclick.net/clk;262219672;13503038;z? http://info.appdynamics.com/FreeJavaPerformanceDownload.html _______________________________________________ edk2-devel mailing list edk2-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/edk2-devel