From: bert hubert Date: Wed, 4 Jan 2017 21:39:06 +0000 (+0100) Subject: improve comment on getaddrinfo X-Git-Tag: rec-4.1.0-alpha1~364 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1746e9bbd0f2f24a58dc755fbb118704b67b0408;p=thirdparty%2Fpdns.git improve comment on getaddrinfo --- diff --git a/pdns/misc.cc b/pdns/misc.cc index 038500276c..527a036e1d 100644 --- a/pdns/misc.cc +++ b/pdns/misc.cc @@ -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; }