summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorOtto Moerbeek <otto@cvs.openbsd.org>2017-12-29 08:16:56 +0000
committerOtto Moerbeek <otto@cvs.openbsd.org>2017-12-29 08:16:56 +0000
commit489e1785ffd28f494bfa80d9ac7f2f837e32e345 (patch)
tree1ce389495041af0dc264d105b432879b67f9a1c4 /usr.bin
parent549a9fefc85b186245b9482ec6df812e52276652 (diff)
small optimization in bexp; from kshe
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/dc/bcode.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/usr.bin/dc/bcode.c b/usr.bin/dc/bcode.c
index eea7346c1bc..e1e9a7b64d5 100644
--- a/usr.bin/dc/bcode.c
+++ b/usr.bin/dc/bcode.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bcode.c,v 1.61 2017/12/12 19:07:10 otto Exp $ */
+/* $OpenBSD: bcode.c,v 1.62 2017/12/29 08:16:55 otto Exp $ */
/*
* Copyright (c) 2003, Otto Moerbeek <otto@drijf.net>
@@ -1178,11 +1178,11 @@ bexp(void)
bn_checkp(f);
split_number(p, i, f);
if (!BN_is_zero(f))
- warnx("Runtime warning: non-zero fractional part in exponent");
- BN_free(i);
+ warnx("Runtime warning: non-zero fractional part "
+ "in exponent");
+ BN_free(p->number);
+ p->number = i;
BN_free(f);
-
- normalize(p, 0);
}
neg = BN_is_negative(p->number);