summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAlejandro Colomar <alx.manpages@gmail.com>2022-06-23 13:25:04 +0200
committerAlejandro Colomar <alx.manpages@gmail.com>2022-07-18 19:09:30 +0200
commit6ba39ccf9b862f56155aa4b391063bf548ce6574 (patch)
treea803cd90ffa18cbaceaa1fb9c147808624c96870
parent5015b05fc495bf3e87f8decfd1617a4a399939d4 (diff)
downloadunit-6ba39ccf9b862f56155aa4b391063bf548ce6574.tar.gz
unit-6ba39ccf9b862f56155aa4b391063bf548ce6574.tar.bz2
Fixed incorrect code.
The #endif was misplaced by accident during a refactor: <https://github.com/nginx/unit/commit/029942f4eb7196c2cff0d0e26bc6ff274138f7d8>. clang(1)'s -Wunreachable-code-break (implied by -Weverything) catches that, but it is only produced for code compiled without support for Unix sockets, which is probably the reason it was undetected: no-one seems to be compiling Unit without Unix sockets support (at least with clang(1)).
-rw-r--r--src/nxt_sockaddr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nxt_sockaddr.c b/src/nxt_sockaddr.c
index 71e50e3c..e8dee83a 100644
--- a/src/nxt_sockaddr.c
+++ b/src/nxt_sockaddr.c
@@ -208,8 +208,8 @@ nxt_getsockname(nxt_task_t *task, nxt_mp_t *mp, nxt_socket_t s)
#if (NXT_HAVE_UNIX_DOMAIN)
case AF_UNIX:
length = nxt_length("unix:") + socklen;
-#endif
break;
+#endif
case AF_INET:
length = NXT_INET_ADDR_STR_LEN;