From: Remi Gacogne Date: Tue, 13 Jun 2023 08:52:33 +0000 (+0200) Subject: channel: Fix clang-tidy warnings X-Git-Tag: rec-5.0.0-alpha1~161^2~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ebd45edec62cd9df0ee21fda2213d48c0f222ebf;p=thirdparty%2Fpdns.git channel: Fix clang-tidy warnings --- diff --git a/pdns/channel.cc b/pdns/channel.cc index 9b820437d5..5892f9e0f8 100644 --- a/pdns/channel.cc +++ b/pdns/channel.cc @@ -110,6 +110,6 @@ std::pair createNotificationQueue(bool nonBlocking, size_t pip setPipeBufferSize(receiver.getHandle(), pipeBufferSize); } - return std::pair(Notifier(std::move(sender)), Waiter(std::move(receiver), throwOnEOF)); + return {Notifier(std::move(sender)), Waiter(std::move(receiver), throwOnEOF)}; } } diff --git a/pdns/test-channel.cc b/pdns/test-channel.cc index 500db1fb68..6965eecdbf 100644 --- a/pdns/test-channel.cc +++ b/pdns/test-channel.cc @@ -46,7 +46,7 @@ BOOST_AUTO_TEST_CASE(test_object_queue_full) while (!blocked) { auto obj = std::make_unique(); obj->a = 42U; - blocked = sender.send(std::move(obj)) == false; + blocked = !sender.send(std::move(obj)); if (blocked) { BOOST_CHECK(obj); }