3 ms·
I remember working with two C teams where one did: rc = do_something(); if (!rc) { rc = do_something_else(); } ... do_cleanup(); and the othe
by zelos 5y ago
I remember working with two C teams where one did:
rc = do_something();
if (!rc) {
rc = do_something_else();
}
...
do_cleanup();
and the other did:
rc = do_something();
if (rc) goto xout;
rc = do_something_else();
...
xout:
do_cleanup();
I think the goto was clearer and harder to get wrong?