It returns a length, not a Boolean, so check for 0 explicitly. This is
purely cosmetic.
ok jsing
-/* $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.
*
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: