Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

GOTO Considered Harmful

Name: Anonymous 2014-06-07 13:54

[code]
if ((err = SSLHashSHA1.update(&hashCtx, &serverRandom)) != 0)
goto fail;
if ((err = SSLHashSHA1.update(&hashCtx, &signedParams)) != 0)
goto fail;
goto fail;
if ((err = SSLHashSHA1.final(&hashCtx, &hashOut)) != 0)
goto fail;
.../[code]

Name: Anonymous 2014-06-07 14:15

This could happened with everything, I am not a fan of goto but for fuck's sake

if ((err = SSLHashSHA1.update(&hashCtx, &serverRandom)) != 0)
throw exceptionFailFactoryFactory;
if ((err = SSLHashSHA1.update(&hashCtx, &signedParams)) != 0)
throw exceptionFailFactoryFactory;
throw exceptionFailFactoryFactory;
if ((err = SSLHashSHA1.final(&hashCtx, &hashOut)) != 0)
throw exceptionFailFactoryFactory;
/* throw a exception to the factory that creates factories that create failures */

this could be avoided by using auto-indenting, emacs and kate have that for cases like this
Now, can anybody tell me why the fuck do they put ``err ='' if they do not use it?

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List