bn_test: handle rc consistently
authortb <tb@openbsd.org>
Fri, 7 Apr 2023 22:18:42 +0000 (22:18 +0000)
committertb <tb@openbsd.org>
Fri, 7 Apr 2023 22:18:42 +0000 (22:18 +0000)
commit2e7cce5e0451c8fc4b8ecdeb36d69185ec382511
tree2fe99010b45e3484541bb38e873ad12253865b2d
parent4bbad1a51a1d8994c07e5718eb45e2d11111bbf1
bn_test: handle rc consistently

Various test functions had bugs due to the fact that the return code
would be set to 1 at the top so that each error would have to set rc = 0.
This is silly. Fail closed instead by setting rc = 0 at the top and only
flipping to 1 before the err label
regress/lib/libcrypto/bn/bn_test.c