]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
improve comment on getaddrinfo
authorbert hubert <bert.hubert@netherlabs.nl>
Wed, 4 Jan 2017 21:39:06 +0000 (22:39 +0100)
committerbert hubert <bert.hubert@netherlabs.nl>
Wed, 4 Jan 2017 21:39:06 +0000 (22:39 +0100)
pdns/misc.cc

index 038500276cc0286ddc1f9f37a8ffb84f4f17811c..527a036e1d3929f463fda638b87e278913df9451 100644 (file)
@@ -719,7 +719,8 @@ int makeIPv6sockaddr(const std::string& addr, struct sockaddr_in6* ret)
     hints.ai_flags = AI_NUMERICHOST;
 
     int error;
-    if((error=getaddrinfo(ourAddr.c_str(), 0, &hints, &res))) { // this is correct
+    // getaddrinfo has anomalous return codes, anything nonzero is an error, positive or negative
+    if((error=getaddrinfo(ourAddr.c_str(), 0, &hints, &res))) {
       return -1;
     }