Style fixes.

This commit is contained in:
Andrey Zelenkov 2018-02-07 15:34:42 +03:00
parent d2c85a2d9e
commit 949ba262cc
12 changed files with 23 additions and 25 deletions

View file

@ -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;
}

View file

@ -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;
}

View file

@ -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) {

View file

@ -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);
}

View file

@ -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)

View file

@ -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;
}

View file

@ -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;
}

View file

@ -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;

View file

@ -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 {

View file

@ -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);

View file

@ -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

View file

@ -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;