From 348fc0a62e6a30581a7d35eaad5a2bcd226172b9 Mon Sep 17 00:00:00 2001 From: Otto Moerbeek Date: Fri, 25 Feb 2022 14:16:47 +0100 Subject: [PATCH] string::find(char) returns a size_type, not a bool; coverity CID 1475294 --- pdns/syncres.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pdns/syncres.cc b/pdns/syncres.cc index a1daf9d56a..87704cb417 100644 --- a/pdns/syncres.cc +++ b/pdns/syncres.cc @@ -3253,7 +3253,7 @@ static void allowAdditionalEntry(std::unordered_set& allowedAdditionals if (auto naptrContent = getRR(rec)) { auto flags = naptrContent->getFlags(); toLowerInPlace(flags); - if (flags.find('a') || flags.find('s')) { + if (flags.find('a') != string::npos || flags.find('s') != string::npos) { allowedAdditionals.insert(naptrContent->getReplacement()); } } -- 2.47.2