summaryrefslogtreecommitdiffhomepage
path: root/src/nxt_main_process.c
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2019-10-10 19:42:41 +0300
committerIgor Sysoev <igor@sysoev.ru>2019-10-10 19:42:41 +0300
commit09e7357b085aab4f29bdadceee112bd7a8ccf706 (patch)
treee40a03d49ffd99d436adb8715e585763aa061b59 /src/nxt_main_process.c
parentec0d5c928efcfb2d4958246d686718cb9747f722 (diff)
downloadunit-09e7357b085aab4f29bdadceee112bd7a8ccf706.tar.gz
unit-09e7357b085aab4f29bdadceee112bd7a8ccf706.tar.bz2
Style fixes.
Diffstat (limited to 'src/nxt_main_process.c')
-rw-r--r--src/nxt_main_process.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/nxt_main_process.c b/src/nxt_main_process.c
index 85685fbc..84f6e2a2 100644
--- a/src/nxt_main_process.c
+++ b/src/nxt_main_process.c
@@ -70,8 +70,8 @@ static void nxt_main_port_access_log_handler(nxt_task_t *task,
static nxt_int_t nxt_init_set_isolation(nxt_task_t *task,
nxt_process_init_t *init, nxt_conf_value_t *isolation);
-static nxt_int_t nxt_init_set_ns(nxt_task_t *task,
- nxt_process_init_t *init, nxt_conf_value_t *ns);
+static nxt_int_t nxt_init_set_ns(nxt_task_t *task, nxt_process_init_t *init,
+ nxt_conf_value_t *ns);
const nxt_sig_event_t nxt_main_process_signals[] = {
nxt_event_signal(SIGHUP, nxt_main_process_signal_handler),
@@ -1540,7 +1540,8 @@ nxt_init_set_isolation(nxt_task_t *task, nxt_process_init_t *init,
static nxt_int_t
-nxt_init_set_ns(nxt_task_t *task, nxt_process_init_t *init, nxt_conf_value_t *namespaces)
+nxt_init_set_ns(nxt_task_t *task, nxt_process_init_t *init,
+ nxt_conf_value_t *namespaces)
{
uint32_t index;
nxt_str_t name;
@@ -1549,7 +1550,13 @@ nxt_init_set_ns(nxt_task_t *task, nxt_process_init_t *init, nxt_conf_value_t *na
index = 0;
- while ((value = nxt_conf_next_object_member(namespaces, &name, &index)) != NULL) {
+ for ( ;; ) {
+ value = nxt_conf_next_object_member(namespaces, &name, &index);
+
+ if (value == NULL) {
+ break;
+ }
+
flag = 0;
#if (NXT_HAVE_CLONE_NEWUSER)