diff options
author | Marco Bodrato <bodrato@mail.dm.unipi.it> | 2021-05-25 21:07:11 +0200 |
---|---|---|
committer | Marco Bodrato <bodrato@mail.dm.unipi.it> | 2021-05-25 21:07:11 +0200 |
commit | 2a6e78106383121c6611c1d560babad6bb48ccb9 (patch) | |
tree | 83a206d74b2b685c28be00a3e58b96cdeec44fa5 /mpn/generic | |
parent | 5fd47755ef3135c8eb71455226b961e0789d6a17 (diff) | |
download | gmp-2a6e78106383121c6611c1d560babad6bb48ccb9.tar.gz |
mpn/generic/{sec_,}powm.c (win_size): Remove the unused value from array.
Diffstat (limited to 'mpn/generic')
-rw-r--r-- | mpn/generic/powm.c | 6 | ||||
-rw-r--r-- | mpn/generic/sec_powm.c | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/mpn/generic/powm.c b/mpn/generic/powm.c index 201f17d2b..1e30f2f76 100644 --- a/mpn/generic/powm.c +++ b/mpn/generic/powm.c @@ -6,7 +6,7 @@ SAFE TO REACH THEM THROUGH DOCUMENTED INTERFACES. IN FACT, IT IS ALMOST GUARANTEED THAT THEY WILL CHANGE OR DISAPPEAR IN A FUTURE GNU MP RELEASE. -Copyright 2007-2012, 2019, 2020 Free Software Foundation, Inc. +Copyright 2007-2012, 2019-2021 Free Software Foundation, Inc. This file is part of the GNU MP Library. @@ -163,8 +163,8 @@ static inline int win_size (mp_bitcnt_t eb) { int k; - static mp_bitcnt_t x[] = {0,7,25,81,241,673,1793,4609,11521,28161,~(mp_bitcnt_t)0}; - for (k = 1; eb > x[k]; k++) + static mp_bitcnt_t x[] = {7,25,81,241,673,1793,4609,11521,28161,~(mp_bitcnt_t)0}; + for (k = 0; eb > x[k++]; ) ; return k; } diff --git a/mpn/generic/sec_powm.c b/mpn/generic/sec_powm.c index b768e5ae6..bba11cf6b 100644 --- a/mpn/generic/sec_powm.c +++ b/mpn/generic/sec_powm.c @@ -3,7 +3,7 @@ Contributed to the GNU project by Torbjörn Granlund. -Copyright 2007-2009, 2011-2014, 2018-2019 Free Software Foundation, Inc. +Copyright 2007-2009, 2011-2014, 2018-2019, 2021 Free Software Foundation, Inc. This file is part of the GNU MP Library. @@ -185,8 +185,8 @@ win_size (mp_bitcnt_t enb) We require that x[k] >= k, then it follows that enb > x[k-1] >= k-1, which implies k <= enb. */ - static const mp_bitcnt_t x[] = {0,POWM_SEC_TABLE,~(mp_bitcnt_t)0}; - for (k = 1; enb > x[k]; k++) + static const mp_bitcnt_t x[] = {POWM_SEC_TABLE,~(mp_bitcnt_t)0}; + for (k = 0; enb > x[k++]; ) ; ASSERT (k <= enb); return k; |