From 607c351a149e23617e14c8fd583fcb4f4e9d2aeb Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 6 May 1999 23:17:13 +0000 Subject: Update. 1999-05-06 Ulrich Drepper * nss/digits_dots.c: Correct return value interpretation of inet_ntoa. Fix PR libc/1109. --- nss/digits_dots.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'nss/digits_dots.c') diff --git a/nss/digits_dots.c b/nss/digits_dots.c index ecc49c1..28a3397 100644 --- a/nss/digits_dots.c +++ b/nss/digits_dots.c @@ -98,7 +98,7 @@ { if (!*cp) { - int not_ok; + int ok; if (*--cp == '.') break; @@ -108,13 +108,13 @@ 255.255.255.255? The test below will succeed spuriously... ??? */ if (af == AF_INET) - not_ok = inet_aton (name, (struct in_addr *) host_addr); + ok = inet_aton (name, (struct in_addr *) host_addr); else { assert (af == AF_INET6); - not_ok = (inet_pton (af, name, host_addr) <= 0); + ok = (inet_pton (af, name, host_addr) > 0); } - if (not_ok) + if (! ok) { __set_h_errno (HOST_NOT_FOUND); #ifndef HAVE_LOOKUP_BUFFER -- cgit v1.1