2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-30 22:15:20 +00:00

The return value of lwres_net_pton was checked for != 0 in a few places,

not == 1.
This commit is contained in:
Brian Wellington
2001-01-31 22:06:33 +00:00
parent 2571d4a73d
commit d378ec4758

View File

@@ -19,7 +19,7 @@
* PERFORMANCE OF THIS SOFTWARE. * PERFORMANCE OF THIS SOFTWARE.
*/ */
/* $Id: getaddrinfo.c,v 1.36 2001/01/09 21:59:16 bwelling Exp $ */ /* $Id: getaddrinfo.c,v 1.37 2001/01/31 22:06:33 bwelling Exp $ */
#include <config.h> #include <config.h>
@@ -281,7 +281,7 @@ lwres_getaddrinfo(const char *hostname, const char *servname,
#endif #endif
if (lwres_net_pton(AF_INET, hostname, (struct in_addr *)abuf) if (lwres_net_pton(AF_INET, hostname, (struct in_addr *)abuf)
!= 0) == 1)
{ {
if (family == AF_INET6) { if (family == AF_INET6) {
/* /*
@@ -299,7 +299,7 @@ lwres_getaddrinfo(const char *hostname, const char *servname,
goto common; goto common;
#ifdef LWRES_HAVE_SIN6_SCOPE_ID #ifdef LWRES_HAVE_SIN6_SCOPE_ID
} else if (ntmp[0] != '\0' && } else if (ntmp[0] != '\0' &&
lwres_net_pton(AF_INET6, ntmp, abuf) != 0) lwres_net_pton(AF_INET6, ntmp, abuf) == 1)
{ {
if (family && family != AF_INET6) if (family && family != AF_INET6)
return (EAI_NONAME); return (EAI_NONAME);
@@ -308,7 +308,7 @@ lwres_getaddrinfo(const char *hostname, const char *servname,
family = AF_INET6; family = AF_INET6;
goto common; goto common;
#endif #endif
} else if (lwres_net_pton(AF_INET6, hostname, abuf) != 0) { } else if (lwres_net_pton(AF_INET6, hostname, abuf) == 1) {
if (family != 0 && family != AF_INET6) if (family != 0 && family != AF_INET6)
return (EAI_NONAME); return (EAI_NONAME);
inet6_addr: inet6_addr: