]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Address some coverity-reported warnings.
authorMiod Vallat <miod.vallat@powerdns.com>
Fri, 5 Sep 2025 06:00:42 +0000 (08:00 +0200)
committerMiod Vallat <miod.vallat@powerdns.com>
Thu, 25 Sep 2025 09:43:27 +0000 (11:43 +0200)
Signed-off-by: Miod Vallat <miod.vallat@powerdns.com>
pdns/pdnsutil.cc

index 06aa5322e88976b76c954a22da4e7fd62bf4da0b..162c294fdae5ed8fac06904d19f865a185f490d1 100644 (file)
@@ -1963,7 +1963,7 @@ static bool parseZoneFile(const char* tmpnam, int& errorline, std::vector<DNSRec
   try {
     while(zpt.get(zrr)) {
       DNSRecord rec(zrr);
-      records.push_back(rec);
+      records.push_back(std::move(rec));
     }
   }
   catch(std::exception& e) {
@@ -2078,7 +2078,9 @@ static int editZone(const ZoneName &zone, const PDNSColors& col)
   }
 
   // Get the original SOA record once, for comparison purposes.
-  B.getSOAUncached(info.zone, soa);
+  // Note that this may fail if there is no active SOA record, which is not a
+  // problem here, as we are only interested into the _current_ serial number.
+  (void)B.getSOAUncached(info.zone, soa);
 
   // Ensure that the temporary file will only be accessible by the current user,
   // not even by other users in the same group, and certainly not by other