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-08 4:12

On a slightly related note, is this harmful?

errlevel=0;
a=push1(data);
if(a != SUCCESS) {errlevel=-1; goto FAIL0};
a=push2(otherdata);
if(a != SUCCESS) {errlevel=-2; goto FAIL1};
a=do_something(data,otherdata);
if(a != SUCCESS) errlevel=-3;
pop2(otherdata);
FAIL1:
pop1(data);
FAIL0:
return errlevel;

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