Fixed dead assignments.

Found by Clang Static Analyzer.
This commit is contained in:
Max Romanov
2021-08-03 13:59:27 +03:00
parent fa9fb29be2
commit db03dfad67
6 changed files with 3 additions and 10 deletions

View File

@@ -201,7 +201,6 @@ nxt_buf_completion(nxt_task_t *task, void *obj, void *data)
nxt_buf_t *b, *next, *parent;
b = obj;
parent = data;
nxt_debug(task, "buf completion: %p %p", b, b->mem.start);
@@ -275,7 +274,6 @@ nxt_buf_ts_completion(nxt_task_t *task, void *obj, void *data)
nxt_buf_t *b, *next, *parent;
b = obj;
parent = data;
if (nxt_buf_ts_handle(task, obj, data)) {
return;

View File

@@ -720,11 +720,10 @@ nxt_event_engine_buf_mem_free(nxt_event_engine_t *engine, nxt_buf_t *b)
void
nxt_event_engine_buf_mem_completion(nxt_task_t *task, void *obj, void *data)
{
nxt_event_engine_t *engine;
nxt_buf_t *b, *next, *parent;
nxt_event_engine_t *engine;
b = obj;
parent = data;
nxt_debug(task, "buf completion: %p %p", b, b->mem.start);

View File

@@ -955,7 +955,6 @@ nxt_h1p_request_body_read(nxt_task_t *task, nxt_http_request_t *r)
} else {
size = nxt_min(body_buffer_size, size);
b->mem.free = nxt_cpymem(b->mem.free, in->mem.pos, size);
body_buffer_size -= size;
}
in->mem.pos += size;

View File

@@ -253,7 +253,6 @@ nxt_http_chunk_buf_completion(nxt_task_t *task, void *obj, void *data)
nxt_buf_t *b, *next, *parent;
b = obj;
parent = data;
nxt_debug(task, "buf completion: %p %p", b, b->mem.start);

View File

@@ -126,10 +126,10 @@ nxt_isolation_main_prefork(nxt_task_t *task, nxt_process_t *process,
return ret;
}
has_mnt = 0;
#if (NXT_HAVE_CLONE_NEWNS)
has_mnt = nxt_is_clone_flag_set(process->isolation.clone.flags, NEWNS);
#else
has_mnt = 0;
#endif
if (process->user_cred->uid == 0 && !has_mnt) {

View File

@@ -347,8 +347,6 @@ nxt_port_main_start_process_handler(nxt_task_t *task, nxt_port_recv_msg_t *msg)
nxt_process_init_t *init;
nxt_common_app_conf_t *app_conf;
ret = NXT_ERROR;
rt = task->thread->runtime;
process = nxt_main_process_new(task, rt);