When you expect a function to return a particular value, don't put a comment
authormiod <miod@openbsd.org>
Thu, 7 Aug 2014 19:46:31 +0000 (19:46 +0000)
committermiod <miod@openbsd.org>
Thu, 7 Aug 2014 19:46:31 +0000 (19:46 +0000)
commitffb772b401a7e4d8ff166372a160eb0da562824c
tree4204be25125390a03429c66abc90c5b245fee015
parent9ad8bdbcd5f818be7837ca2591701efb400093f3
When you expect a function to return a particular value, don't put a comment
saying that you expect it to return that value and compare it against zero
because it is supposedly faster, for this leads to bugs (especially given the
high rate of sloppy cut'n'paste within ssl3 and dtls1 routines in this
library).

Instead, compare for the exact value it ought to return upon success.

ok deraadt@
15 files changed:
lib/libssl/d1_both.c
lib/libssl/d1_clnt.c
lib/libssl/d1_pkt.c
lib/libssl/s23_srvr.c
lib/libssl/s3_both.c
lib/libssl/s3_lib.c
lib/libssl/src/ssl/d1_both.c
lib/libssl/src/ssl/d1_clnt.c
lib/libssl/src/ssl/d1_pkt.c
lib/libssl/src/ssl/s23_srvr.c
lib/libssl/src/ssl/s3_both.c
lib/libssl/src/ssl/s3_enc.c
lib/libssl/src/ssl/s3_lib.c
lib/libssl/src/ssl/t1_enc.c
lib/libssl/t1_enc.c