From 24883ca79fbda26976171a38387b0f2d4bc04961 Mon Sep 17 00:00:00 2001 From: Jeffrey Walton Date: Wed, 27 Dec 2017 00:43:00 -0500 Subject: [PATCH] Clear Coverity issue CID 186337 --- simon.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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]);