mirror of
https://sourceware.org/git/glibc.git
synced 2025-08-08 17:42:12 +03:00
Improve last change a bit.
This commit is contained in:
@@ -107,17 +107,12 @@
|
|||||||
we'd actually done a lookup. What if someone types
|
we'd actually done a lookup. What if someone types
|
||||||
255.255.255.255? The test below will succeed
|
255.255.255.255? The test below will succeed
|
||||||
spuriously... ??? */
|
spuriously... ??? */
|
||||||
switch (af)
|
if (af == AF_INET)
|
||||||
{
|
|
||||||
case AF_INET:
|
|
||||||
not_ok = inet_aton (name, (struct in_addr *) host_addr);
|
not_ok = inet_aton (name, (struct in_addr *) host_addr);
|
||||||
break;
|
else
|
||||||
case AF_INET6:
|
{
|
||||||
|
assert (af == AF_INET6);
|
||||||
not_ok = (inet_pton (af, name, host_addr) <= 0);
|
not_ok = (inet_pton (af, name, host_addr) <= 0);
|
||||||
break;
|
|
||||||
default:
|
|
||||||
assert (! "There should be no other `af' value");
|
|
||||||
not_ok = 1;
|
|
||||||
}
|
}
|
||||||
if (not_ok)
|
if (not_ok)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user