]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Two coverity fixes 17789/head
authorOtto Moerbeek <otto.moerbeek@open-xchange.com>
Thu, 23 Jul 2026 11:24:57 +0000 (13:24 +0200)
committerOtto Moerbeek <otto.moerbeek@open-xchange.com>
Thu, 23 Jul 2026 11:24:57 +0000 (13:24 +0200)
I hope compilers are smart enough to see that the bottom of the function cannot be reached
(clang is happy with the missing return).

Signed-off-by: Otto Moerbeek <otto.moerbeek@open-xchange.com>
pdns/iputils.cc
pdns/query-local-address.cc

index 44d458790c66432a8bb54811c3ea4c3d610a705b..5b0e91f56c6ccbbac0969bba655fbd959f2ad3c4 100644 (file)
@@ -473,7 +473,7 @@ pdns::expected<size_t, int> sendMsgWithOptions(int socketDesc, const void* buffe
     }
   } while (true);
 
-  return 0;
+  // NOTREACHED
 }
 
 template class NetmaskTree<bool, Netmask>;
index f5b5a4d3b61da692c245e9bdb7580ea9e2eb7570..32a15a20f92fb3e1869744142e0980312355abad 100644 (file)
@@ -102,7 +102,7 @@ namespace pdns
         itf = Interface{ parts.at(1), idx };
       }
 
-      AddressAndInterface tmp{ComboAddress{addr}, itf};
+      AddressAndInterface tmp{ComboAddress{addr}, std::move(itf)};
       if (tmp.d_address.isIPv4()) {
         g_localQueryAddresses4.emplace_back(std::move(tmp));
         continue;