Remove redundant bn->top computation.
One less to worry about.
Bug: 232
Change-Id: Ib7d38e18fee02590088d76363e17f774cfefa59b
Reviewed-on: https://boringssl-review.googlesource.com/25252
Reviewed-by: Adam Langley <agl@google.com>
diff --git a/crypto/fipsmodule/bn/add.c b/crypto/fipsmodule/bn/add.c
index 201c526..645e647 100644
--- a/crypto/fipsmodule/bn/add.c
+++ b/crypto/fipsmodule/bn/add.c
@@ -199,7 +199,6 @@
}
int BN_sub(BIGNUM *r, const BIGNUM *a, const BIGNUM *b) {
- int max;
int add = 0, neg = 0;
const BIGNUM *tmp;
@@ -232,13 +231,6 @@
return 1;
}
- // We are actually doing a - b :-)
-
- max = (a->top > b->top) ? a->top : b->top;
- if (!bn_wexpand(r, max)) {
- return 0;
- }
-
if (BN_ucmp(a, b) < 0) {
if (!BN_usub(r, b, a)) {
return 0;