Fix return value check for inet_pton().
Obtained from: KAME Project
This commit is contained in:
parent
6f3dbe5e1a
commit
d59590d848
@ -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