summaryrefslogtreecommitdiffhomepage
path: root/src/nxt_application.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nxt_application.c')
-rw-r--r--src/nxt_application.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/nxt_application.c b/src/nxt_application.c
index 186614a0..8b5779c3 100644
--- a/src/nxt_application.c
+++ b/src/nxt_application.c
@@ -138,7 +138,7 @@ nxt_discovery_modules(nxt_task_t *task, const char *path)
}
}
- size = sizeof("[]") - 1;
+ size = nxt_length("[]");
module = modules->elts;
n = modules->nelts;
@@ -146,9 +146,9 @@ nxt_discovery_modules(nxt_task_t *task, const char *path)
nxt_debug(task, "module: %d %V %V",
module[i].type, &module[i].version, &module[i].file);
- size += sizeof("{\"type\": ,") - 1;
- size += sizeof(" \"version\": \"\",") - 1;
- size += sizeof(" \"file\": \"\"},") - 1;
+ size += nxt_length("{\"type\": ,");
+ size += nxt_length(" \"version\": \"\",");
+ size += nxt_length(" \"file\": \"\"},");
size += NXT_INT_T_LEN
+ module[i].version.length