Fix return value check for inet_pton().

Obtained from:	KAME Project
This commit is contained in:
Munechika SUMIKAWA 2000-01-25 13:54:47 +00:00
parent 6f3dbe5e1a
commit d59590d848

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);
}