]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
string::find(char) returns a size_type, not a bool; coverity CID 1475294 11365/head
authorOtto Moerbeek <otto.moerbeek@open-xchange.com>
Fri, 25 Feb 2022 13:16:47 +0000 (14:16 +0100)
committerOtto Moerbeek <otto.moerbeek@open-xchange.com>
Fri, 25 Feb 2022 13:18:44 +0000 (14:18 +0100)
pdns/syncres.cc

index a1daf9d56aacc04808fbc4b9cf926f6c91e4eece..87704cb417f5844b0cd9380436acf31f24a3fede 100644 (file)
@@ -3253,7 +3253,7 @@ static void allowAdditionalEntry(std::unordered_set<DNSName>& allowedAdditionals
     if (auto naptrContent = getRR<NAPTRRecordContent>(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());
       }
     }