diff options
author | Otto Moerbeek <otto@cvs.openbsd.org> | 2017-02-26 11:29:56 +0000 |
---|---|---|
committer | Otto Moerbeek <otto@cvs.openbsd.org> | 2017-02-26 11:29:56 +0000 |
commit | fef72b64bce0c9903c16a8cbff8996462c4b66d1 (patch) | |
tree | 0e47845c8d067578472ab91058868227475f4dcd | |
parent | 5e8178095f4745607210bbd78347dcd05506c915 (diff) |
Move away from BN_zero, the one returning an int is deprecated and the
new one is a void function. From Daniel Cegielka.
-rw-r--r-- | usr.bin/dc/bcode.c | 8 | ||||
-rw-r--r-- | usr.bin/dc/inout.c | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/usr.bin/dc/bcode.c b/usr.bin/dc/bcode.c index 8e50c1e8037..6a0e590382a 100644 --- a/usr.bin/dc/bcode.c +++ b/usr.bin/dc/bcode.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bcode.c,v 1.50 2017/02/23 06:40:17 otto Exp $ */ +/* $OpenBSD: bcode.c,v 1.51 2017/02/26 11:29:55 otto Exp $ */ /* * Copyright (c) 2003, Otto Moerbeek <otto@drijf.net> @@ -386,7 +386,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_check(BN_set_word(f, 0)); else if (n->scale < sizeof(factors)/sizeof(factors[0])) { rem = BN_div_word(i, factors[n->scale]); if (f != NULL) @@ -804,7 +804,7 @@ load(void) v = stack_tos(&bmachine.reg[idx]); if (v == NULL) { n = new_number(); - bn_check(BN_zero(n->number)); + bn_check(BN_set_word(n->number, 0)); push_number(n); } else push(stack_dup_value(v, ©)); @@ -888,7 +888,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_check(BN_set_word(n->number, 0)); push_number(n); } else diff --git a/usr.bin/dc/inout.c b/usr.bin/dc/inout.c index 617e3fb619f..fae74f71d8e 100644 --- a/usr.bin/dc/inout.c +++ b/usr.bin/dc/inout.c @@ -1,4 +1,4 @@ -/* $OpenBSD: inout.c,v 1.19 2015/02/16 20:53:34 jca Exp $ */ +/* $OpenBSD: inout.c,v 1.20 2017/02/26 11:29:55 otto Exp $ */ /* * Copyright (c) 2003, Otto Moerbeek <otto@drijf.net> @@ -186,7 +186,7 @@ readnumber(struct source *src, u_int base) u_int i; n = new_number(); - bn_check(BN_zero(n->number)); + bn_check(BN_set_word(n->number, 0)); while ((ch = (*src->vtable->readchar)(src)) != EOF) { |