From: otto Date: Fri, 29 Dec 2017 08:16:55 +0000 (+0000) Subject: small optimization in bexp; from kshe X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=29c1552080be8e40c6c64eaf9671ac9a52abe35c;p=openbsd small optimization in bexp; from kshe --- 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 @@ -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);