]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
tidy 14665/head
authorPeter van Dijk <peter.van.dijk@powerdns.com>
Fri, 13 Sep 2024 07:20:42 +0000 (09:20 +0200)
committerPeter van Dijk <peter.van.dijk@powerdns.com>
Fri, 20 Sep 2024 12:28:00 +0000 (14:28 +0200)
pdns/sdig.cc

index d4cf2cace6e41fb169eb281eb0c6d8d111e02521..72483aa8e182f84bef1fa9d6ce58c0fec897eef5 100644 (file)
@@ -89,7 +89,8 @@ static void fillPacket(vector<uint8_t>& packet, const string& q, const string& t
 static void printReply(const string& reply, bool showflags, bool hidesoadetails, bool dumpluaraw, bool ignoreId = false)
 {
   MOADNSParser mdp(false, reply);
-  if (!ignoreId && !s_expectedIDs.count(ntohs(mdp.d_header.id))) {
+
+  if (!ignoreId && (s_expectedIDs.count(ntohs(mdp.d_header.id)) == 0U)) {
     cout << "ID " << ntohs(mdp.d_header.id) << " was not expected, this response was not meant for us!"<<endl;
   }
   s_expectedIDs.erase(ntohs(mdp.d_header.id));