diff options
author | Richard Levitte <levitte@openssl.org> | 2003-05-21 08:40:06 +0000 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2003-05-21 08:40:06 +0000 |
commit | 513c01a591d2c55e61006c1e8f26c16e9dc55307 (patch) | |
tree | 5e76465520936b418734978185456b1479ccc228 /crypto/ec | |
parent | d9a2a89a17869cba4446b6d5437005871e325a10 (diff) |
Make sure EC_window_bits_for_scalar_size() returns a size_t
Diffstat (limited to 'crypto/ec')
-rw-r--r-- | crypto/ec/ec_mult.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/crypto/ec/ec_mult.c b/crypto/ec/ec_mult.c index c71a69ac0d..236b66c18a 100644 --- a/crypto/ec/ec_mult.c +++ b/crypto/ec/ec_mult.c @@ -307,12 +307,13 @@ static signed char *compute_wNAF(const BIGNUM *scalar, int w, size_t *ret_len) * (thus the boundaries should be increased) */ #define EC_window_bits_for_scalar_size(b) \ - ((b) >= 2000 ? 6 : \ - (b) >= 800 ? 5 : \ - (b) >= 300 ? 4 : \ - (b) >= 70 ? 3 : \ - (b) >= 20 ? 2 : \ - 1) + ((size_t) \ + ((b) >= 2000 ? 6 : \ + (b) >= 800 ? 5 : \ + (b) >= 300 ? 4 : \ + (b) >= 70 ? 3 : \ + (b) >= 20 ? 2 : \ + 1)) /* Compute * \sum scalars[i]*points[i], |