diff --git a/src/ripple/basics/impl/ResolverAsio.cpp b/src/ripple/basics/impl/ResolverAsio.cpp index ffabbb95c..541e54e8a 100644 --- a/src/ripple/basics/impl/ResolverAsio.cpp +++ b/src/ripple/basics/impl/ResolverAsio.cpp @@ -242,7 +242,7 @@ public: // If we get an error message back, we don't return any // results that we may have gotten. - if (ec == 0) + if (!ec) { while (iter != boost::asio::ip::tcp::resolver::iterator()) { diff --git a/src/test/server/ServerStatus_test.cpp b/src/test/server/ServerStatus_test.cpp index 7d6872a50..cf9c484f7 100644 --- a/src/test/server/ServerStatus_test.cpp +++ b/src/test/server/ServerStatus_test.cpp @@ -640,7 +640,7 @@ class ServerStatus_test : ++readCount; // expect the reads to fail for the clients that connected at or // above the limit. If limit is 0, all reads should succeed - BEAST_EXPECT((limit == 0 || readCount < limit-1) ? (! ec) : ec); + BEAST_EXPECT((limit == 0 || readCount < limit-1) ? (! ec) : bool(ec)); } }