]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Cleanup geoipbackend.cc
authorFred Morcos <fred.morcos@open-xchange.com>
Tue, 2 Jul 2024 20:20:04 +0000 (22:20 +0200)
committerFred Morcos <fred.morcos@open-xchange.com>
Tue, 2 Jul 2024 20:24:28 +0000 (22:24 +0200)
modules/geoipbackend/geoipbackend.cc

index 5d06d2f6cc4401b2fc319f3203f683b9aba50d4d..7a87bf48f988b7f9109bb2fc9f06a864b799f0ac 100644 (file)
@@ -512,8 +512,9 @@ void GeoIPBackend::lookup(const QType& qtype, const DNSName& qdomain, int zoneId
   }
 
   Netmask addr{"0.0.0.0/0"};
-  if (pkt_p != nullptr)
+  if (pkt_p != nullptr) {
     addr = Netmask(pkt_p->getRealRemote());
+  }
 
   gl.netmask = 0;
 
@@ -582,8 +583,9 @@ void GeoIPBackend::lookup(const QType& qtype, const DNSName& qdomain, int zoneId
 
 bool GeoIPBackend::get(DNSResourceRecord& r)
 {
-  if (d_result.empty())
+  if (d_result.empty()) {
     return false;
+  }
 
   r = d_result.back();
   d_result.pop_back();