From 7378a1b86d8e68279ee62fe31addbdb81603e4d2 Mon Sep 17 00:00:00 2001 From: Jeffrey Walton Date: Sat, 23 Jul 2016 19:37:17 -0400 Subject: [PATCH] Cleared analysis warning on use of boolean in arithmetic expression --- chacha.cpp | 4 ++-- chacha.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/chacha.cpp b/chacha.cpp index b6ebd9c5..833a6acb 100644 --- a/chacha.cpp +++ b/chacha.cpp @@ -1,6 +1,6 @@ // chacha.cpp - written and placed in the public domain by Jeffrey Walton. // Copyright assigned to the Crypto++ project. -// Based on Wei Dai's Salsa20 and Bernstein's reference ChaCha +// Based on Wei Dai's Salsa20 and Bernstein's reference ChaCha // family implementation at http://cr.yp.to/chacha.html. #include "pch.h" @@ -141,7 +141,7 @@ void ChaCha_Policy::OperateKeystream(KeystreamOperation operation, byte *outp #endif ++m_state[12]; - m_state[13] += !!(m_state[12] == 0); + m_state[13] += static_cast(m_state[12] == 0); } } diff --git a/chacha.h b/chacha.h index 302c477d..28b8c7af 100644 --- a/chacha.h +++ b/chacha.h @@ -1,6 +1,6 @@ // chacha.h - written and placed in the public domain by Jeffrey Walton. // Copyright assigned to the Crypto++ project. -// Based on Wei Dai's Salsa20 and Bernstein's reference ChaCha +// Based on Wei Dai's Salsa20 and Bernstein's reference ChaCha // family implementation at http://cr.yp.to/chacha.html. //! \file chacha.h