mirror of
https://github.com/freebsd/freebsd-src
synced 2024-09-06 17:18:32 +00:00
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
This commit is contained in:
parent
2409231121
commit
c45e66dca3
|
@ -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
|
||||
|
|
|
@ -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));
|
||||
|
|
Loading…
Reference in a new issue