summaryrefslogtreecommitdiff
path: root/simon.cpp
diff options
context:
space:
mode:
authorJeffrey Walton <noloader@gmail.com>2017-12-27 00:43:00 -0500
committerJeffrey Walton <noloader@gmail.com>2017-12-27 00:43:00 -0500
commit24883ca79fbda26976171a38387b0f2d4bc04961 (patch)
treed31b543de14eac4ceb8a062edf7ea1c6f3c43927 /simon.cpp
parent3b1f6827f5621656bd3e50e63d29c64b3c2aced9 (diff)
downloadcryptopp-git-24883ca79fbda26976171a38387b0f2d4bc04961.tar.gz
Clear Coverity issue CID 186337
Diffstat (limited to 'simon.cpp')
-rw-r--r--simon.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/simon.cpp b/simon.cpp
index f7fa8517..f5eab397 100644
--- a/simon.cpp
+++ b/simon.cpp
@@ -75,7 +75,7 @@ inline void SIMON_Decrypt(W p[2], const W c[2], const W k[R])
p[0]=c[0]; p[1]=c[1];
unsigned int rounds = R;
- if (rounds & 1)
+ if (R & 1)
{
const W t = p[1]; p[1] = p[0]; p[0] = t;
p[1] ^= k[rounds - 1]; p[1] ^= f(p[0]);