Fix return value check for inet_pton().

Obtained from:	KAME Project
This commit is contained in:
sumikawa 2000-01-25 13:54:47 +00:00
parent 5f276b7f68
commit 3d5a00cf0c

View File

@ -917,7 +917,7 @@ getaddr(which, s, hpp)
switch (afamily) {
#ifdef INET6
case AF_INET6:
if (inet_pton(AF_INET6, s, (void *)&su->sin6.sin6_addr) == -1) {
if (inet_pton(AF_INET6, s, (void *)&su->sin6.sin6_addr) != 1) {
(void) fprintf(stderr, "%s: bad value\n", s);
exit(1);
}