summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2015-10-02 20:56:15 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2015-10-02 20:56:15 +0000
commit640932a148bcd552721cde822bc63a61cf8cfe20 (patch)
tree9d69cda79e33841a38cee355999bb847af569de8
parentfa8a4eced963e628995f2392cf0f402a82ed5231 (diff)
make a && && & block more readable. no binary change.
discussed with otto
-rw-r--r--lib/libc/asr/getnameinfo.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/lib/libc/asr/getnameinfo.c b/lib/libc/asr/getnameinfo.c
index 4beb30d906b..a61b542e08c 100644
--- a/lib/libc/asr/getnameinfo.c
+++ b/lib/libc/asr/getnameinfo.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: getnameinfo.c,v 1.7 2015/09/14 07:38:37 guenther Exp $ */
+/* $OpenBSD: getnameinfo.c,v 1.8 2015/10/02 20:56:14 deraadt Exp $ */
/*
* Copyright (c) 2012 Eric Faurot <eric@openbsd.org>
*
@@ -154,9 +154,12 @@ getnameinfo(const struct sockaddr *sa, socklen_t salen, char *host,
const char *proto;
size_t r;
- /* Take a shortcut if we don't care about hostname, or if NI_NUMERICHOST is set. */
- if (host == NULL || hostlen == 0 || (host && hostlen && flags & NI_NUMERICHOST)) {
-
+ /*
+ * Take a shortcut if we don't care about hostname,
+ * or if NI_NUMERICHOST is set.
+ */
+ if (host == NULL || hostlen == 0 ||
+ (host && hostlen && (flags & NI_NUMERICHOST))) {
if (host) {
r = asr_print_addr(sa, host, hostlen);
if (r == 0)