aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/hash
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2017-10-01 06:51:06 -0400
committerJack Lloyd <[email protected]>2017-10-01 06:51:06 -0400
commit7b1fa2b7798264f2866eb80ca43181efddb66141 (patch)
tree9c24919a8b53e3baa5417ca7e7dac0883d0f8cc0 /src/lib/hash
parente58f66ae5f07f31419a819ded874fcf39aa1fdc6 (diff)
Fix some cast warnings from Sonar
Diffstat (limited to 'src/lib/hash')
-rw-r--r--src/lib/hash/streebog/streebog.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/hash/streebog/streebog.cpp b/src/lib/hash/streebog/streebog.cpp
index 07286e9c8..cd67256cb 100644
--- a/src/lib/hash/streebog/streebog.cpp
+++ b/src/lib/hash/streebog/streebog.cpp
@@ -29,7 +29,7 @@ static inline void addm(const uint8_t* m, uint64_t* h)
const uint64_t hi = load_le<uint64_t>(reinterpret_cast<uint8_t*>(h), i);
const uint64_t t = hi + m64;
- const uint64_t overflow = (t < hi) | (t < m64);
+ const uint64_t overflow = (t < hi ? 1 : 0) | (t < m64 ? 1 : 0);
store_le(t + carry, reinterpret_cast<uint8_t*>(&h[i]));
carry = overflow;
}