summaryrefslogtreecommitdiff
path: root/libc/inet
diff options
context:
space:
mode:
authorMarcus Haehnel <marcus.haehnel@kernkonzept.com>2023-11-26 00:05:19 +0100
committerWaldemar Brodkorb <wbx@openadk.org>2023-11-27 08:48:52 +0100
commit20d7d58f1aa3cd230252b6391ff5db7e84d0efa3 (patch)
tree9d41a88af7110ee201d5586f5469d0566aad5695 /libc/inet
parentd2c58318e70eaac636e83e718e389603dde85eac (diff)
getaddrinfo.c: Avoid misleading indentation warning
When compiling getaddrinfo.c with clang the -Wmisleading-indentation option will cause a warning due to the indentation lining up with the previous statement in the if block above. For gcc the warning is blinded by the commented line. See also: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107162 Move the comment behind the function call to make both compilers happy.
Diffstat (limited to 'libc/inet')
-rw-r--r--libc/inet/getaddrinfo.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/libc/inet/getaddrinfo.c b/libc/inet/getaddrinfo.c
index a9000ae13..f34a4726c 100644
--- a/libc/inet/getaddrinfo.c
+++ b/libc/inet/getaddrinfo.c
@@ -959,8 +959,7 @@ getaddrinfo(const char *name, const char *service,
last_i = i;
if (hints->ai_family == AF_UNSPEC && (i & GAIH_OKIFUNSPEC))
continue;
- /*if (p) - freeaddrinfo works ok on NULL too */
- freeaddrinfo(p);
+ freeaddrinfo(p); /* freeaddrinfo works ok on NULL too */
return -(i & GAIH_EAI);
}
if (end)