summaryrefslogtreecommitdiffhomepage
path: root/src/nxt_socket.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_socket.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 '')
-rw-r--r--src/nxt_socket.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/nxt_socket.c b/src/nxt_socket.c
index b9bbac46..529d7f7d 100644
--- a/src/nxt_socket.c
+++ b/src/nxt_socket.c
@@ -190,7 +190,8 @@ nxt_socket_bind(nxt_task_t *task, nxt_socket_t s, nxt_sockaddr_t *sa,
{
nxt_err_t err;
- nxt_debug(task, "bind(%d, %*s)", s, sa->length, nxt_sockaddr_start(sa));
+ nxt_debug(task, "bind(%d, %*s)", s, (size_t) sa->length,
+ nxt_sockaddr_start(sa));
if (nxt_fast_path(bind(s, &sa->u.sockaddr, sa->socklen) == 0)) {
return NXT_OK;
@@ -203,7 +204,7 @@ nxt_socket_bind(nxt_task_t *task, nxt_socket_t s, nxt_sockaddr_t *sa,
}
nxt_log(task, NXT_LOG_CRIT, "bind(%d, %*s) failed %E",
- s, sa->length, nxt_sockaddr_start(sa), err);
+ s, (size_t) sa->length, nxt_sockaddr_start(sa), err);
return NXT_ERROR;
}
@@ -216,7 +217,8 @@ nxt_socket_connect(nxt_task_t *task, nxt_socket_t s, nxt_sockaddr_t *sa)
nxt_int_t ret;
nxt_uint_t level;
- nxt_debug(task, "connect(%d, %*s)", s, sa->length, nxt_sockaddr_start(sa));
+ nxt_debug(task, "connect(%d, %*s)",
+ s, (size_t) sa->length, nxt_sockaddr_start(sa));
if (connect(s, &sa->u.sockaddr, sa->socklen) == 0) {
return NXT_OK;
@@ -228,7 +230,7 @@ nxt_socket_connect(nxt_task_t *task, nxt_socket_t s, nxt_sockaddr_t *sa)
case NXT_EINPROGRESS:
nxt_debug(task, "connect(%d, %*s) in progress",
- s, sa->length, nxt_sockaddr_start(sa));
+ s, (size_t) sa->length, nxt_sockaddr_start(sa));
return NXT_AGAIN;
case NXT_ECONNREFUSED:
@@ -258,7 +260,7 @@ nxt_socket_connect(nxt_task_t *task, nxt_socket_t s, nxt_sockaddr_t *sa)
}
nxt_log(task, level, "connect(%d, %*s) failed %E",
- s, sa->length, nxt_sockaddr_start(sa), err);
+ s, (size_t) sa->length, nxt_sockaddr_start(sa), err);
return ret;
}