OpenSSL 1.0.0 released
OpenSSL 1.0.0 released
Posted Mar 30, 2010 18:42 UTC (Tue) by MisterIO (guest, #36192)In reply to: OpenSSL 1.0.0 released by vonbrand
Parent article: OpenSSL 1.0.0 released
Actually there's nothing strange about it(about that if(0), I mean). I've never used it that way, but I could understand its meaning immediately. Sure, the err label is usually at the end, after the return, but what happens if you need to do the normal cleanup, that you do in the normal path before the return, in the error path too? It happens that you need to repeat code, like this:
normal_cleanup;
return
:err
error_cleanup;
normal_cleanup;
Instead, with that if(0) construct, you can do this:
if (0) {
:err error_cleanup;
}
normal_cleanup;
return;
To me it seems clear and simple. The only problem could be if it screws up some static checker or some software to follow the flow of your code.
