summaryrefslogtreecommitdiffhomepage
path: root/src/nxt_application.h
diff options
context:
space:
mode:
authorValentin Bartenev <vbart@nginx.com>2018-06-25 16:51:47 +0300
committerValentin Bartenev <vbart@nginx.com>2018-06-25 16:51:47 +0300
commit1a52d876f7e10d07f58deee6faeaf70a11a6110f (patch)
treef69ba903180b3deac3bba2ee7acda9d34f18d73c /src/nxt_application.h
parentaf31012815e20f0c92ed6ea803638a16ba47b0c2 (diff)
downloadunit-1a52d876f7e10d07f58deee6faeaf70a11a6110f.tar.gz
unit-1a52d876f7e10d07f58deee6faeaf70a11a6110f.tar.bz2
Introduced nxt_length() macro.
Diffstat (limited to '')
-rw-r--r--src/nxt_application.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nxt_application.h b/src/nxt_application.h
index 0ddaeb7c..b5ce3e63 100644
--- a/src/nxt_application.h
+++ b/src/nxt_application.h
@@ -184,7 +184,7 @@ nxt_app_msg_write_nvp_(nxt_task_t *task, nxt_app_wmsg_t *msg,
#define nxt_app_msg_write_const(task, msg, c) \
- nxt_app_msg_write((task), (msg), (u_char *)(c), sizeof(c) - 1)
+ nxt_app_msg_write((task), (msg), (u_char *) (c), nxt_length(c))
#define nxt_app_msg_write_str(task, msg, str) \
nxt_app_msg_write((task), (msg), (str)->start, (str)->length)
@@ -193,7 +193,7 @@ nxt_app_msg_write_nvp_(nxt_task_t *task, nxt_app_wmsg_t *msg,
nxt_app_msg_write((task), (msg), (c), nxt_strlen(c))
#define nxt_app_msg_write_nvp(task, msg, n, v) \
- nxt_app_msg_write_nvp_((task), (msg), (u_char *)(n), sizeof(n) - 1, \
+ nxt_app_msg_write_nvp_((task), (msg), (u_char *) (n), nxt_length(n), \
(v)->start, (v)->length)
nxt_inline nxt_int_t nxt_app_msg_write_size(nxt_task_t *task,