summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorume <ume@FreeBSD.org>2005-05-13 17:56:53 +0000
committerume <ume@FreeBSD.org>2005-05-13 17:56:53 +0000
commitf96b51e1fae5f83f6597c18a3d05214f9d5678e8 (patch)
tree9f5a0b0ab4c3d141c01c09bbd35ea5dfc54a71a8 /lib
parent2442aa4520ea9232db5f5b86f715e5de4a8c7ae7 (diff)
downloadFreeBSD-src-f96b51e1fae5f83f6597c18a3d05214f9d5678e8.zip
FreeBSD-src-f96b51e1fae5f83f6597c18a3d05214f9d5678e8.tar.gz
raise readability bit.
Diffstat (limited to 'lib')
-rw-r--r--lib/libc/net/name6.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/libc/net/name6.c b/lib/libc/net/name6.c
index 6dfb663..4bbc5f0 100644
--- a/lib/libc/net/name6.c
+++ b/lib/libc/net/name6.c
@@ -323,12 +323,13 @@ getipnodebyname(const char *name, int af, int flags, int *errp)
struct hostent *hp;
union inx_addr addrbuf;
- if (af != AF_INET
+ switch (af) {
+ case AF_INET:
#ifdef INET6
- && af != AF_INET6
+ case AF_INET6:
#endif
- )
- {
+ break;
+ default:
*errp = NO_RECOVERY;
return NULL;
}
@@ -359,9 +360,8 @@ getipnodebyname(const char *name, int af, int flags, int *errp)
hp = _ghbyname(name, af, flags, errp);
#ifdef INET6
- if (af == AF_INET6
- && ((flags & AI_ALL) || hp == NULL)
- && (MAPADDRENABLED(flags))) {
+ if (af == AF_INET6 && ((flags & AI_ALL) || hp == NULL) &&
+ MAPADDRENABLED(flags)) {
struct hostent *hp2 = _ghbyname(name, AF_INET, flags, errp);
if (hp == NULL)
hp = _hpmapv6(hp2, errp);
OpenPOWER on IntegriCloud