summaryrefslogtreecommitdiff
path: root/lib/libcrypto/bn
diff options
context:
space:
mode:
authorTheo Buehler <tb@cvs.openbsd.org>2023-06-23 10:33:13 +0000
committerTheo Buehler <tb@cvs.openbsd.org>2023-06-23 10:33:13 +0000
commit68892df3713317eb58a17db507a1d38f746f6533 (patch)
tree8a212c94ea90796fb3351f7f557227d861f2c83e /lib/libcrypto/bn
parent0032818f99343a1d793446f15471f3e8a4f7bd81 (diff)
Fix return check of bn_hex2bn_cbs()
It returns a length, not a Boolean, so check for 0 explicitly. This is purely cosmetic. ok jsing
Diffstat (limited to 'lib/libcrypto/bn')
-rw-r--r--lib/libcrypto/bn/bn_convert.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/libcrypto/bn/bn_convert.c b/lib/libcrypto/bn/bn_convert.c
index 0dbe20046b8..9ad9f58f939 100644
--- a/lib/libcrypto/bn/bn_convert.c
+++ b/lib/libcrypto/bn/bn_convert.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bn_convert.c,v 1.10 2023/06/23 10:31:27 tb Exp $ */
+/* $OpenBSD: bn_convert.c,v 1.11 2023/06/23 10:33:12 tb Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@@ -291,13 +291,13 @@ BN_asc2bn(BIGNUM **bnp, const char *s)
goto decimal;
if (v != 'X' && v != 'x')
goto decimal;
- if (!bn_hex2bn_cbs(bnp, &cbs_hex))
+ if (bn_hex2bn_cbs(bnp, &cbs_hex) == 0)
return 0;
goto done;
decimal:
- if (!bn_dec2bn_cbs(bnp, &cbs))
+ if (bn_dec2bn_cbs(bnp, &cbs) == 0)
return 0;
done: