提交 31f014e0 编写于 作者: R Rich Felker

fix bogus return values for inet_pton

上级 4b5f0540
...@@ -21,11 +21,11 @@ int inet_pton(int af, const char *s, void *a0) ...@@ -21,11 +21,11 @@ int inet_pton(int af, const char *s, void *a0)
return 0; return 0;
s=z+1; s=z+1;
} }
return 0; return 1;
} else if (af==AF_INET6) { } else if (af==AF_INET6) {
return !__ipparse(a, AF_INET6, s); return !__ipparse(a, AF_INET6, s);
} }
errno = EAFNOSUPPORT; errno = EAFNOSUPPORT;
return 0; return -1;
} }
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册