From 2a6e78106383121c6611c1d560babad6bb48ccb9 Mon Sep 17 00:00:00 2001 From: Marco Bodrato Date: Tue, 25 May 2021 21:07:11 +0200 Subject: mpn/generic/{sec_,}powm.c (win_size): Remove the unused value from array. --- mpn/generic/powm.c | 6 +++--- mpn/generic/sec_powm.c | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'mpn') 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; -- cgit v1.2.1