diff options
author | Andrey Zelenkov <zelenkov@nginx.com> | 2018-02-07 15:34:42 +0300 |
---|---|---|
committer | Andrey Zelenkov <zelenkov@nginx.com> | 2018-02-07 15:34:42 +0300 |
commit | 949ba262cc7a833a717bbb271825c0ba72ad80b8 (patch) | |
tree | eb32e0083b177ea42141a1b8208abad1ac714eab /src | |
parent | d2c85a2d9e491a08222272b88b20c9398e06449b (diff) | |
download | unit-949ba262cc7a833a717bbb271825c0ba72ad80b8.tar.gz unit-949ba262cc7a833a717bbb271825c0ba72ad80b8.tar.bz2 |
Style fixes.
Diffstat (limited to '')
-rw-r--r-- | src/nxt_conf_validation.c | 8 | ||||
-rw-r--r-- | src/nxt_conn_close.c | 2 | ||||
-rw-r--r-- | src/nxt_fastcgi_source.c | 8 | ||||
-rw-r--r-- | src/nxt_file.c | 2 | ||||
-rw-r--r-- | src/nxt_malloc.h | 2 | ||||
-rw-r--r-- | src/nxt_port_memory.c | 2 | ||||
-rw-r--r-- | src/nxt_port_socket.c | 2 | ||||
-rw-r--r-- | src/nxt_router.c | 2 | ||||
-rw-r--r-- | src/nxt_sendbuf.c | 4 | ||||
-rw-r--r-- | src/nxt_work_queue.c | 2 | ||||
-rw-r--r-- | src/nxt_work_queue.h | 10 | ||||
-rw-r--r-- | src/perl/nxt_perl_psgi.c | 4 |
12 files changed, 23 insertions, 25 deletions
diff --git a/src/nxt_conf_validation.c b/src/nxt_conf_validation.c index ea160d8e..bd36fdd2 100644 --- a/src/nxt_conf_validation.c +++ b/src/nxt_conf_validation.c @@ -584,7 +584,7 @@ nxt_conf_vldt_processes(nxt_conf_validation_t *vldt, nxt_conf_value_t *value, if (proc.spare > NXT_INT32_T_MAX) { return nxt_conf_vldt_error(vldt, "The \"spare\" number must not " - "not exceed %d.", NXT_INT32_T_MAX); + "exceed %d.", NXT_INT32_T_MAX); } if (proc.max < 1) { @@ -594,7 +594,7 @@ nxt_conf_vldt_processes(nxt_conf_validation_t *vldt, nxt_conf_value_t *value, if (proc.max > NXT_INT32_T_MAX) { return nxt_conf_vldt_error(vldt, "The \"max\" number must not " - "not exceed %d.", NXT_INT32_T_MAX); + "exceed %d.", NXT_INT32_T_MAX); } if (proc.max < proc.spare) { @@ -609,7 +609,7 @@ nxt_conf_vldt_processes(nxt_conf_validation_t *vldt, nxt_conf_value_t *value, if (proc.idle_timeout > NXT_INT32_T_MAX / 1000) { return nxt_conf_vldt_error(vldt, "The \"idle_timeout\" number must not " - "not exceed %d.", NXT_INT32_T_MAX / 1000); + "exceed %d.", NXT_INT32_T_MAX / 1000); } return NXT_OK; @@ -708,5 +708,3 @@ nxt_conf_vldt_group(nxt_conf_validation_t *vldt, char *group) return NXT_ERROR; } - - diff --git a/src/nxt_conn_close.c b/src/nxt_conn_close.c index f70d418e..f9586624 100644 --- a/src/nxt_conn_close.c +++ b/src/nxt_conn_close.c @@ -63,7 +63,7 @@ nxt_conn_close(nxt_event_engine_t *engine, nxt_conn_t *c) wq = &engine->shutdown_work_queue; handler = nxt_conn_shutdown_handler; - } else{ + } else { wq = &engine->close_work_queue; handler = nxt_conn_close_handler; } diff --git a/src/nxt_fastcgi_source.c b/src/nxt_fastcgi_source.c index f81f7059..068c00a9 100644 --- a/src/nxt_fastcgi_source.c +++ b/src/nxt_fastcgi_source.c @@ -335,10 +335,10 @@ nxt_fastcgi_next_param(nxt_fastcgi_source_t *fs, nxt_fastcgi_param_t *param) nxt_int_t ret; enum { - sw_name_length = 0, - sw_value_length, - sw_name, - sw_value, + sw_name_length = 0, + sw_value_length, + sw_name, + sw_value, }; switch (fs->state) { diff --git a/src/nxt_file.c b/src/nxt_file.c index 4c2a8783..ce971f82 100644 --- a/src/nxt_file.c +++ b/src/nxt_file.c @@ -581,7 +581,7 @@ nxt_pipe_close(nxt_task_t *task, nxt_fd_t *pp) nxt_debug(task, "pipe close(%FD:%FD)", pp[0], pp[1]); if (close(pp[0]) != 0) { - nxt_log(task, NXT_LOG_CRIT, "pipe close (%FD) failed %E", + nxt_log(task, NXT_LOG_CRIT, "pipe close(%FD) failed %E", pp[0], nxt_errno); } diff --git a/src/nxt_malloc.h b/src/nxt_malloc.h index 3b3de5f4..ccc3e1ef 100644 --- a/src/nxt_malloc.h +++ b/src/nxt_malloc.h @@ -105,7 +105,7 @@ nxt_malloc_cutback(cutback, size) #define \ nxt_malloc_usable_size(p, size) \ - size = malloc_good_size(size) + size = malloc_good_size(size) #define \ nxt_malloc_cutback(cutback, size) diff --git a/src/nxt_port_memory.c b/src/nxt_port_memory.c index 87e7c1bc..a44cee01 100644 --- a/src/nxt_port_memory.c +++ b/src/nxt_port_memory.c @@ -554,7 +554,7 @@ nxt_port_mmap_tracking_read(nxt_task_t *task, nxt_port_recv_msg_t *msg) b = msg->buf; - if (nxt_buf_used_size(b) < (int)sizeof(nxt_port_mmap_tracking_msg_t)) { + if (nxt_buf_used_size(b) < (int) sizeof(nxt_port_mmap_tracking_msg_t)) { nxt_debug(task, "too small message %O", nxt_buf_used_size(b)); return 0; } diff --git a/src/nxt_port_socket.c b/src/nxt_port_socket.c index c3485bdb..04f9c30c 100644 --- a/src/nxt_port_socket.c +++ b/src/nxt_port_socket.c @@ -864,7 +864,7 @@ nxt_port_error_handler(nxt_task_t *task, void *obj, void *data) nxt_queue_each(msg, &port->messages, nxt_port_send_msg_t, link) { - for(b = msg->buf; b != NULL; b = b->next) { + for (b = msg->buf; b != NULL; b = b->next) { if (nxt_buf_is_sync(b)) { continue; } diff --git a/src/nxt_router.c b/src/nxt_router.c index 69c7ddfd..e8003c11 100644 --- a/src/nxt_router.c +++ b/src/nxt_router.c @@ -612,7 +612,7 @@ nxt_router_ra_use(nxt_task_t *task, nxt_req_app_link_t *ra, int i) nxt_inline void -nxt_router_ra_error(nxt_req_app_link_t *ra, int code, const char* str) +nxt_router_ra_error(nxt_req_app_link_t *ra, int code, const char *str) { ra->app_port = NULL; ra->err_code = code; diff --git a/src/nxt_sendbuf.c b/src/nxt_sendbuf.c index b36c5edb..704236ca 100644 --- a/src/nxt_sendbuf.c +++ b/src/nxt_sendbuf.c @@ -52,7 +52,7 @@ nxt_sendbuf_mem_coalesce0(nxt_task_t *task, nxt_sendbuf_t *sb, goto done; } - iov[n].iov_base = b->mem.pos; + iov[n].iov_base = b->mem.pos; iov[n].iov_len = size; } else { @@ -126,7 +126,7 @@ nxt_sendbuf_mem_coalesce(nxt_task_t *task, nxt_sendbuf_coalesce_t *sb) goto done; } - sb->iobuf[n].iov_base = b->mem.pos; + sb->iobuf[n].iov_base = b->mem.pos; sb->iobuf[n].iov_len = size; } else { diff --git a/src/nxt_work_queue.c b/src/nxt_work_queue.c index 1b989eab..f38f700b 100644 --- a/src/nxt_work_queue.c +++ b/src/nxt_work_queue.c @@ -71,7 +71,7 @@ void nxt_work_queue_thread_adopt(nxt_work_queue_t *wq) void -nxt_work_queue_name(nxt_work_queue_t *wq, const char* name) +nxt_work_queue_name(nxt_work_queue_t *wq, const char *name) { nxt_work_queue_thread_assert(wq); diff --git a/src/nxt_work_queue.h b/src/nxt_work_queue.h index 05e222dd..d85a784c 100644 --- a/src/nxt_work_queue.h +++ b/src/nxt_work_queue.h @@ -11,10 +11,10 @@ typedef struct nxt_work_s nxt_work_t; struct nxt_task_s { - nxt_thread_t *thread; - nxt_log_t *log; - uint32_t ident; - nxt_work_t *next_work; + nxt_thread_t *thread; + nxt_log_t *log; + uint32_t ident; + nxt_work_t *next_work; /* TODO: exception_handler, prev/next task, subtasks. */ }; @@ -104,7 +104,7 @@ NXT_EXPORT nxt_work_handler_t nxt_work_queue_pop(nxt_work_queue_t *wq, #if (NXT_DEBUG) -NXT_EXPORT void nxt_work_queue_name(nxt_work_queue_t *wq, const char* name); +NXT_EXPORT void nxt_work_queue_name(nxt_work_queue_t *wq, const char *name); NXT_EXPORT void nxt_work_queue_thread_adopt(nxt_work_queue_t *wq); #else diff --git a/src/perl/nxt_perl_psgi.c b/src/perl/nxt_perl_psgi.c index d86976d6..c5c2774c 100644 --- a/src/perl/nxt_perl_psgi.c +++ b/src/perl/nxt_perl_psgi.c @@ -24,7 +24,7 @@ typedef struct { } nxt_perl_psgi_input_t; -nxt_inline nxt_int_t nxt_perl_psgi_write(nxt_task_t *task,nxt_app_wmsg_t *wmsg, +nxt_inline nxt_int_t nxt_perl_psgi_write(nxt_task_t *task, nxt_app_wmsg_t *wmsg, const u_char *data, size_t len, nxt_bool_t flush, nxt_bool_t last); @@ -523,7 +523,7 @@ nxt_perl_psgi_env_append_str(PerlInterpreter *my_perl, HV *hash_env, SV **ha; ha = hv_store(hash_env, name, (I32) strlen(name), - newSVpv((const char *) str->start, (STRLEN)str->length), 0); + newSVpv((const char *) str->start, (STRLEN) str->length), 0); if (nxt_slow_path(ha == NULL)) { return NXT_ERROR; |