Skip to content

Commit

Permalink
Style fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
andrey-zelenkov committed Feb 7, 2018
1 parent d2c85a2 commit 949ba26
Show file tree
Hide file tree
Showing 12 changed files with 23 additions and 25 deletions.
8 changes: 3 additions & 5 deletions src/nxt_conf_validation.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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) {
Expand All @@ -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;
Expand Down Expand Up @@ -708,5 +708,3 @@ nxt_conf_vldt_group(nxt_conf_validation_t *vldt, char *group)

return NXT_ERROR;
}


2 changes: 1 addition & 1 deletion src/nxt_conn_close.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
8 changes: 4 additions & 4 deletions src/nxt_fastcgi_source.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion src/nxt_file.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down
2 changes: 1 addition & 1 deletion src/nxt_malloc.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion src/nxt_port_memory.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
2 changes: 1 addition & 1 deletion src/nxt_port_socket.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
2 changes: 1 addition & 1 deletion src/nxt_router.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions src/nxt_sendbuf.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion src/nxt_work_queue.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
10 changes: 5 additions & 5 deletions src/nxt_work_queue.h
Original file line number Diff line number Diff line change
Expand Up @@ -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. */
};
Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/perl/nxt_perl_psgi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 949ba26

Please sign in to comment.