summaryrefslogtreecommitdiffhomepage
path: root/src/nxt_main_process.c
diff options
context:
space:
mode:
authorSergey Kandaurov <pluknet@nginx.com>2018-01-24 15:16:32 +0300
committerSergey Kandaurov <pluknet@nginx.com>2018-01-24 15:16:32 +0300
commit67c64a99fb78f48c3deacc7d89e73de72522806b (patch)
tree384b433c94fc63e27d21d6b05153d162655e79bc /src/nxt_main_process.c
parent477e8177b70acb694759e62d830b8a311a736324 (diff)
downloadunit-67c64a99fb78f48c3deacc7d89e73de72522806b.tar.gz
unit-67c64a99fb78f48c3deacc7d89e73de72522806b.tar.bz2
Using size_t for the field width type of the "%*s" specifier.
Diffstat (limited to 'src/nxt_main_process.c')
-rw-r--r--src/nxt_main_process.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/nxt_main_process.c b/src/nxt_main_process.c
index aa935a96..af72c111 100644
--- a/src/nxt_main_process.c
+++ b/src/nxt_main_process.c
@@ -870,13 +870,13 @@ nxt_main_port_socket_handler(nxt_task_t *task, nxt_port_recv_msg_t *msg)
msg->port_msg.reply_port);
nxt_debug(task, "listening socket \"%*s\"",
- sa->length, nxt_sockaddr_start(sa));
+ (size_t) sa->length, nxt_sockaddr_start(sa));
ret = nxt_main_listening_socket(sa, &ls);
if (ret == NXT_OK) {
nxt_debug(task, "socket(\"%*s\"): %d",
- sa->length, nxt_sockaddr_start(sa), ls.socket);
+ (size_t) sa->length, nxt_sockaddr_start(sa), ls.socket);
type = NXT_PORT_MSG_RPC_READY_LAST | NXT_PORT_MSG_CLOSE_FD;
@@ -927,7 +927,7 @@ nxt_main_listening_socket(nxt_sockaddr_t *sa, nxt_listening_socket_t *ls)
ls->end = nxt_sprintf(ls->start, ls->end,
"socket(\\\"%*s\\\") failed %E",
- sa->length, nxt_sockaddr_start(sa), err);
+ (size_t) sa->length, nxt_sockaddr_start(sa), err);
return NXT_ERROR;
}
@@ -935,7 +935,8 @@ nxt_main_listening_socket(nxt_sockaddr_t *sa, nxt_listening_socket_t *ls)
if (setsockopt(s, SOL_SOCKET, SO_REUSEADDR, &enable, length) != 0) {
ls->end = nxt_sprintf(ls->start, ls->end,
"setsockopt(\\\"%*s\\\", SO_REUSEADDR) failed %E",
- sa->length, nxt_sockaddr_start(sa), nxt_errno);
+ (size_t) sa->length, nxt_sockaddr_start(sa),
+ nxt_errno);
goto fail;
}
@@ -946,7 +947,8 @@ nxt_main_listening_socket(nxt_sockaddr_t *sa, nxt_listening_socket_t *ls)
if (setsockopt(s, IPPROTO_IPV6, IPV6_V6ONLY, &enable, length) != 0) {
ls->end = nxt_sprintf(ls->start, ls->end,
"setsockopt(\\\"%*s\\\", IPV6_V6ONLY) failed %E",
- sa->length, nxt_sockaddr_start(sa), nxt_errno);
+ (size_t) sa->length, nxt_sockaddr_start(sa),
+ nxt_errno);
goto fail;
}
}
@@ -992,7 +994,7 @@ nxt_main_listening_socket(nxt_sockaddr_t *sa, nxt_listening_socket_t *ls)
}
ls->end = nxt_sprintf(ls->start, ls->end, "bind(\\\"%*s\\\") failed %E",
- sa->length, nxt_sockaddr_start(sa), err);
+ (size_t) sa->length, nxt_sockaddr_start(sa), err);
goto fail;
}