summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--usr.bin/dc/bcode.c8
-rw-r--r--usr.bin/dc/inout.c4
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, &copy));
@@ -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) {