summaryrefslogtreecommitdiffhomepage
path: root/src
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
parentec0d5c928efcfb2d4958246d686718cb9747f722 (diff)
downloadunit-09e7357b085aab4f29bdadceee112bd7a8ccf706.tar.gz
unit-09e7357b085aab4f29bdadceee112bd7a8ccf706.tar.bz2
Style fixes.
Diffstat (limited to '')
-rw-r--r--src/nxt_conf_validation.c19
-rw-r--r--src/nxt_h1proto.c6
-rw-r--r--src/nxt_main_process.c15
-rw-r--r--src/nxt_router.c3
-rw-r--r--src/nxt_unit.c6
-rw-r--r--src/nxt_websocket.c2
-rw-r--r--src/ruby/nxt_ruby_stream_io.c6
7 files changed, 35 insertions, 22 deletions
diff --git a/src/nxt_conf_validation.c b/src/nxt_conf_validation.c
index 206af85d..3cfecbad 100644
--- a/src/nxt_conf_validation.c
+++ b/src/nxt_conf_validation.c
@@ -103,11 +103,9 @@ static nxt_int_t nxt_conf_vldt_java_classpath(nxt_conf_validation_t *vldt,
static nxt_int_t nxt_conf_vldt_java_option(nxt_conf_validation_t *vldt,
nxt_conf_value_t *value);
-static nxt_int_t
-nxt_conf_vldt_isolation(nxt_conf_validation_t *vldt, nxt_conf_value_t *value,
- void *data);
-static nxt_int_t
-nxt_conf_vldt_clone_namespaces(nxt_conf_validation_t *vldt,
+static nxt_int_t nxt_conf_vldt_isolation(nxt_conf_validation_t *vldt,
+ nxt_conf_value_t *value, void *data);
+static nxt_int_t nxt_conf_vldt_clone_namespaces(nxt_conf_validation_t *vldt,
nxt_conf_value_t *value, void *data);
#if (NXT_HAVE_CLONE_NEWUSER)
@@ -620,7 +618,7 @@ static nxt_conf_vldt_object_t nxt_conf_vldt_java_members[] = {
{ nxt_string("classpath"),
NXT_CONF_VLDT_ARRAY,
&nxt_conf_vldt_array_iterator,
- (void *) &nxt_conf_vldt_java_classpath},
+ (void *) &nxt_conf_vldt_java_classpath },
{ nxt_string("webapp"),
NXT_CONF_VLDT_STRING,
@@ -630,7 +628,7 @@ static nxt_conf_vldt_object_t nxt_conf_vldt_java_members[] = {
{ nxt_string("options"),
NXT_CONF_VLDT_ARRAY,
&nxt_conf_vldt_array_iterator,
- (void *) &nxt_conf_vldt_java_option},
+ (void *) &nxt_conf_vldt_java_option },
{ nxt_string("unit_jars"),
NXT_CONF_VLDT_STRING,
@@ -1556,8 +1554,8 @@ nxt_conf_vldt_environment(nxt_conf_validation_t *vldt, nxt_str_t *name,
static nxt_int_t
-nxt_conf_vldt_clone_namespaces(nxt_conf_validation_t *vldt, nxt_conf_value_t *value,
- void *data)
+nxt_conf_vldt_clone_namespaces(nxt_conf_validation_t *vldt,
+ nxt_conf_value_t *value, void *data)
{
return nxt_conf_vldt_object(vldt, value, data);
}
@@ -1722,7 +1720,8 @@ nxt_conf_vldt_php_option(nxt_conf_validation_t *vldt, nxt_str_t *name,
static nxt_int_t
-nxt_conf_vldt_java_classpath(nxt_conf_validation_t *vldt, nxt_conf_value_t *value)
+nxt_conf_vldt_java_classpath(nxt_conf_validation_t *vldt,
+ nxt_conf_value_t *value)
{
nxt_str_t str;
diff --git a/src/nxt_h1proto.c b/src/nxt_h1proto.c
index 7602e9c6..11e15af9 100644
--- a/src/nxt_h1proto.c
+++ b/src/nxt_h1proto.c
@@ -599,13 +599,15 @@ nxt_h1p_header_process(nxt_task_t *task, nxt_h1proto_t *h1p,
}
if (nxt_slow_path(h1p->websocket_key == NULL)) {
- nxt_log(task, NXT_LOG_INFO, "h1p upgrade: bad or absent websocket key");
+ nxt_log(task, NXT_LOG_INFO,
+ "h1p upgrade: bad or absent websocket key");
return NXT_HTTP_BAD_REQUEST;
}
if (nxt_slow_path(h1p->websocket_version_ok == 0)) {
- nxt_log(task, NXT_LOG_INFO, "h1p upgrade: bad or absent websocket version");
+ nxt_log(task, NXT_LOG_INFO,
+ "h1p upgrade: bad or absent websocket version");
return NXT_HTTP_UPGRADE_REQUIRED;
}
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)
diff --git a/src/nxt_router.c b/src/nxt_router.c
index 28781600..1e6e16aa 100644
--- a/src/nxt_router.c
+++ b/src/nxt_router.c
@@ -1458,7 +1458,8 @@ nxt_router_conf_create(nxt_task_t *task, nxt_router_temp_conf_t *tmcf,
next = 0;
for ( ;; ) {
- application = nxt_conf_next_object_member(applications, &name, &next);
+ application = nxt_conf_next_object_member(applications,
+ &name, &next);
if (application == NULL) {
break;
}
diff --git a/src/nxt_unit.c b/src/nxt_unit.c
index 9ccd1fd9..8b1226f5 100644
--- a/src/nxt_unit.c
+++ b/src/nxt_unit.c
@@ -1458,7 +1458,8 @@ nxt_unit_response_realloc(nxt_unit_request_info_t *req,
goto fail;
}
- resp->piggyback_content_length = req->response->piggyback_content_length;
+ resp->piggyback_content_length =
+ req->response->piggyback_content_length;
nxt_unit_sptr_set(&resp->piggyback_content, p);
p = nxt_cpymem(p, nxt_unit_sptr_get(&req->response->piggyback_content),
@@ -1953,7 +1954,8 @@ nxt_unit_mmap_buf_send(nxt_unit_ctx_t *ctx, uint32_t stream,
if (hdr != NULL) {
m.mmap_msg.mmap_id = hdr->id;
- m.mmap_msg.chunk_id = nxt_port_mmap_chunk_id(hdr, (u_char *) buf->start);
+ m.mmap_msg.chunk_id = nxt_port_mmap_chunk_id(hdr,
+ (u_char *) buf->start);
}
nxt_unit_debug(ctx, "#%"PRIu32": send mmap: (%d,%d,%d)",
diff --git a/src/nxt_websocket.c b/src/nxt_websocket.c
index 9a099760..91002237 100644
--- a/src/nxt_websocket.c
+++ b/src/nxt_websocket.c
@@ -19,7 +19,7 @@ nxt_inline void
nxt_hton16(uint8_t *b, uint16_t v)
{
b[0] = (v >> 8);
- b[1] = (v & 0xFFu);
+ b[1] = (v & 0xFFu);
}
diff --git a/src/ruby/nxt_ruby_stream_io.c b/src/ruby/nxt_ruby_stream_io.c
index 3f6cac89..fcfcf5dd 100644
--- a/src/ruby/nxt_ruby_stream_io.c
+++ b/src/ruby/nxt_ruby_stream_io.c
@@ -31,7 +31,8 @@ nxt_ruby_stream_io_input_init(void)
rb_gc_register_address(&stream_io);
rb_define_singleton_method(stream_io, "new", nxt_ruby_stream_io_new, 1);
- rb_define_method(stream_io, "initialize", nxt_ruby_stream_io_initialize, -1);
+ rb_define_method(stream_io, "initialize",
+ nxt_ruby_stream_io_initialize, -1);
rb_define_method(stream_io, "gets", nxt_ruby_stream_io_gets, 0);
rb_define_method(stream_io, "each", nxt_ruby_stream_io_each, 0);
rb_define_method(stream_io, "read", nxt_ruby_stream_io_read, -2);
@@ -51,7 +52,8 @@ nxt_ruby_stream_io_error_init(void)
rb_gc_register_address(&stream_io);
rb_define_singleton_method(stream_io, "new", nxt_ruby_stream_io_new, 1);
- rb_define_method(stream_io, "initialize", nxt_ruby_stream_io_initialize, -1);
+ rb_define_method(stream_io, "initialize",
+ nxt_ruby_stream_io_initialize, -1);
rb_define_method(stream_io, "puts", nxt_ruby_stream_io_puts, -2);
rb_define_method(stream_io, "write", nxt_ruby_stream_io_write, -2);
rb_define_method(stream_io, "flush", nxt_ruby_stream_io_flush, 0);