summaryrefslogtreecommitdiff
path: root/nss/digits_dots.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1999-05-06 23:17:13 +0000
committerUlrich Drepper <drepper@redhat.com>1999-05-06 23:17:13 +0000
commit607c351a149e23617e14c8fd583fcb4f4e9d2aeb (patch)
treedd43de3d47a813e07a53d89514430c4a89e7df56 /nss/digits_dots.c
parentcbd57e25288e1803e4db5f5503f9d75a55f7d024 (diff)
downloadglibc-607c351a149e23617e14c8fd583fcb4f4e9d2aeb.tar.gz
Update.
1999-05-06 Ulrich Drepper <drepper@cygnus.com> * nss/digits_dots.c: Correct return value interpretation of inet_ntoa. Fix PR libc/1109.
Diffstat (limited to 'nss/digits_dots.c')
-rw-r--r--nss/digits_dots.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/nss/digits_dots.c b/nss/digits_dots.c
index ecc49c1c27..28a3397927 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