From 8d657a651735426388c5f7462e2dbf24225a26cb Mon Sep 17 00:00:00 2001 From: ENikS Date: Sat, 6 Sep 2014 15:59:59 -0400 Subject: Fixing compiler warning C4800: 'type' forcing value to bool 'true' or 'false' --- src/key.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/key.cpp') diff --git a/src/key.cpp b/src/key.cpp index a058ef05e..8ed787654 100644 --- a/src/key.cpp +++ b/src/key.cpp @@ -172,9 +172,9 @@ public: bool ret; BIGNUM bn; BN_init(&bn); - ret = BN_bin2bn(vch, 32, &bn); + ret = BN_bin2bn(vch, 32, &bn) != NULL; assert(ret); - ret = EC_KEY_regenerate_key(pkey, &bn); + ret = EC_KEY_regenerate_key(pkey, &bn) != 0; assert(ret); BN_clear_free(&bn); } @@ -217,7 +217,7 @@ public: bool SetPubKey(const CPubKey &pubkey) { const unsigned char* pbegin = pubkey.begin(); - return o2i_ECPublicKey(&pkey, &pbegin, pubkey.size()); + return o2i_ECPublicKey(&pkey, &pbegin, pubkey.size()) != NULL; } bool Sign(const uint256 &hash, std::vector& vchSig) { @@ -553,7 +553,7 @@ bool CPubKey::RecoverCompact(const uint256 &hash, const std::vector