summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2007-10-13 00:18:48 (GMT)
committerH. Peter Anvin <hpa@zytor.com>2007-10-13 00:18:48 (GMT)
commitf3dab4e3133387571752d14e7508b6341ed7b464 (patch)
tree512d06d25ae00543ea8c54f5e3abc233611f0084
parentc0fc8fefc085ff3a984dc0322af23b2bb38067d2 (diff)
downloadpbn-f3dab4e3133387571752d14e7508b6341ed7b464.zip
pbn-f3dab4e3133387571752d14e7508b6341ed7b464.tar.gz
pbn-f3dab4e3133387571752d14e7508b6341ed7b464.tar.bz2
pbn-f3dab4e3133387571752d14e7508b6341ed7b464.tar.xz
pbn_div(): r is produced by pbn_sub() or pbn_cow() so r->bits is OK
There is no need to call pbn_adjust_bits() since r was produced by pbn_sub() or pbn_cow() and therefore already has r->bits correctly set.
-rw-r--r--pbn_div.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/pbn_div.c b/pbn_div.c
index f7b3a56..7e5b1fa 100644
--- a/pbn_div.c
+++ b/pbn_div.c
@@ -95,10 +95,10 @@ int pbn_div(struct pbn **qp, struct pbn **rp, struct pbn *n, struct pbn *d)
}
}
- r->minus = q->minus;
+ r->minus = q->minus && r->bits;
if (rp)
- *rp = pbn_adjust_bits(r);
+ *rp = r; /* r already has correct bit adjustment */
else
pbn_free(r);