1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-05 12:56:08 +00:00

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
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=56588

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