Fix return value check for inet_pton().
Obtained from: KAME Project
This commit is contained in:
parent
5f276b7f68
commit
3d5a00cf0c
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user