summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2011-04-21 16:57:00 -0400
committerRich Felker <dalias@aerifal.cx>2011-04-21 16:57:00 -0400
commit31f014e0a751d2bb9d40a09fe2cd1a8b0111acf6 (patch)
tree1607db30342c53446d7cb4da7076b535a7213951
parent4b5f054098e484baa6d457aebe8bdab0eeb90215 (diff)
downloadmusl-31f014e0a751d2bb9d40a09fe2cd1a8b0111acf6.tar.gz
musl-31f014e0a751d2bb9d40a09fe2cd1a8b0111acf6.tar.bz2
musl-31f014e0a751d2bb9d40a09fe2cd1a8b0111acf6.tar.xz
musl-31f014e0a751d2bb9d40a09fe2cd1a8b0111acf6.zip
fix bogus return values for inet_pton
-rw-r--r--src/network/inet_pton.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/network/inet_pton.c b/src/network/inet_pton.c
index 349c4025..b7f4834f 100644
--- a/src/network/inet_pton.c
+++ b/src/network/inet_pton.c
@@ -21,11 +21,11 @@ int inet_pton(int af, const char *s, void *a0)
return 0;
s=z+1;
}
- return 0;
+ return 1;
} else if (af==AF_INET6) {
return !__ipparse(a, AF_INET6, s);
}
errno = EAFNOSUPPORT;
- return 0;
+ return -1;
}