From 513c01a591d2c55e61006c1e8f26c16e9dc55307 Mon Sep 17 00:00:00 2001 From: Richard Levitte Date: Wed, 21 May 2003 08:40:06 +0000 Subject: [PATCH] Make sure EC_window_bits_for_scalar_size() returns a size_t --- crypto/ec/ec_mult.c | 13 +++++++------ 1 file 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], -- 2.34.1