0001デフォルトの名無しさん
2014/02/27(木) 23:17:34.39例 if は 一行でも必ず {} でくくること。
理由 {} でくくらなかった為に、常にgoto failが実行されてしまうというようなミスを起こしやすい。
サンプル
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;
...
fail:
SSLFreeBuffer(&signedHashes);