git: c45e66dca3e4 - main - Unbreak usr.bin/dc with OpenSSL 3
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 10 Aug 2023 23:33:35 UTC
The branch main has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=c45e66dca3e4f3073132b6f3e94623c2314f679c commit c45e66dca3e4f3073132b6f3e94623c2314f679c Author: Enji Cooper <ngie@FreeBSD.org> AuthorDate: 2023-08-11 03:36:48 +0000 Commit: Enji Cooper <ngie@FreeBSD.org> CommitDate: 2023-08-11 06:33:44 +0000 Unbreak usr.bin/dc with OpenSSL 3 OpenSSL's BN_zero API has had a void return value since 1.1.x: chase the change to unbreak the build on OpenSSL 3.x with MK_GH_BC == no. MFC after: 2 weeks Reviewed by: emaste, kevans Differential Revision: https://reviews.freebsd.org/D41410 --- usr.bin/dc/bcode.c | 6 +++--- usr.bin/dc/inout.c | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/usr.bin/dc/bcode.c b/usr.bin/dc/bcode.c index ded130facc81..d9a42073e6b3 100644 --- a/usr.bin/dc/bcode.c +++ b/usr.bin/dc/bcode.c @@ -378,7 +378,7 @@ split_number(const struct number *n, BIGNUM *i, BIGNUM *f) bn_checkp(BN_copy(i, n->number)); if (n->scale == 0 && f != NULL) - bn_check(BN_zero(f)); + BN_zero(f); else if (n->scale < sizeof(factors)/sizeof(factors[0])) { rem = BN_div_word(i, factors[n->scale]); if (f != NULL) @@ -811,7 +811,7 @@ load(void) v = stack_tos(&bmachine.reg[idx]); if (v == NULL) { n = new_number(); - bn_check(BN_zero(n->number)); + BN_zero(n->number); push_number(n); } else push(stack_dup_value(v, ©)); @@ -896,7 +896,7 @@ load_array(void) v = frame_retrieve(stack, idx); if (v == NULL || v->type == BCODE_NONE) { n = new_number(); - bn_check(BN_zero(n->number)); + BN_zero(n->number); push_number(n); } else diff --git a/usr.bin/dc/inout.c b/usr.bin/dc/inout.c index e2461923d819..29d8d147e9e7 100644 --- a/usr.bin/dc/inout.c +++ b/usr.bin/dc/inout.c @@ -192,7 +192,7 @@ readnumber(struct source *src, u_int base, u_int bscale) bool dot = false, sign = false; n = new_number(); - bn_check(BN_zero(n->number)); + BN_zero(n->number); while ((ch = (*src->vtable->readchar)(src)) != EOF) { @@ -230,8 +230,8 @@ readnumber(struct source *src, u_int base, u_int bscale) base_n = BN_new(); exponent = BN_new(); divisor = new_number(); - bn_check(BN_zero(base_n)); - bn_check(BN_zero(exponent)); + BN_zero(base_n); + BN_zero(exponent); bn_check(BN_add_word(base_n, base)); bn_check(BN_add_word(exponent, iscale));