mirror of
git://sourceware.org/git/glibc.git
synced 2024-11-21 01:12:26 +08:00
Improve last change a bit.
This commit is contained in:
parent
1b4331b2ac
commit
6df34c4b46
@ -107,17 +107,12 @@
|
||||
we'd actually done a lookup. What if someone types
|
||||
255.255.255.255? The test below will succeed
|
||||
spuriously... ??? */
|
||||
switch (af)
|
||||
{
|
||||
case AF_INET:
|
||||
if (af == AF_INET)
|
||||
not_ok = inet_aton (name, (struct in_addr *) host_addr);
|
||||
break;
|
||||
case AF_INET6:
|
||||
else
|
||||
{
|
||||
assert (af == AF_INET6);
|
||||
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)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user