From 5549ff4c8a05b8d0fcfaca9e534e23fce97301a7 Mon Sep 17 00:00:00 2001 From: seelabs Date: Mon, 12 Mar 2018 09:19:48 -0400 Subject: [PATCH] Fix boost::error_code conversions to int: * Boost 1.67 removes boost::error_code automatic conversions to int --- src/ripple/basics/impl/ResolverAsio.cpp | 2 +- src/test/server/ServerStatus_test.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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)); } }