mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-10 21:23:58 +01:00
Remove if (1) indentation in cpuworker.c
To avoid having diffs turn out too big, I had replaced some unneeded ifs and fors with if (1), so that the indentation would still work out right. Now I might as well clean those up.
This commit is contained in:
parent
1e896214e7
commit
6c9c54e7fa
@ -310,7 +310,6 @@ cpuworker_onion_handshake_replyfn(void *work_)
|
||||
|
||||
--total_pending_tasks;
|
||||
|
||||
if (1) {
|
||||
/* Could avoid this, but doesn't matter. */
|
||||
memcpy(&rpl, &job->u.reply, sizeof(rpl));
|
||||
|
||||
@ -382,7 +381,7 @@ cpuworker_onion_handshake_replyfn(void *work_)
|
||||
goto done_processing;
|
||||
}
|
||||
log_debug(LD_OR,"onionskin_answer succeeded. Yay.");
|
||||
}
|
||||
|
||||
|
||||
done_processing:
|
||||
memwipe(&rpl, 0, sizeof(rpl));
|
||||
@ -408,7 +407,6 @@ cpuworker_onion_handshake_threadfn(void *state_, void *work_)
|
||||
tor_assert(req.magic == CPUWORKER_REQUEST_MAGIC);
|
||||
memset(&rpl, 0, sizeof(rpl));
|
||||
|
||||
if (1) {
|
||||
const create_cell_t *cc = &req.create_cell;
|
||||
created_cell_t *cell_out = &rpl.created_cell;
|
||||
struct timeval tv_start = {0,0}, tv_end;
|
||||
@ -458,7 +456,6 @@ cpuworker_onion_handshake_threadfn(void *state_, void *work_)
|
||||
else
|
||||
rpl.n_usec = (uint32_t) usec;
|
||||
}
|
||||
}
|
||||
|
||||
memcpy(&job->u.reply, &rpl, sizeof(rpl));
|
||||
|
||||
@ -499,7 +496,6 @@ assign_onionskin_to_cpuworker(or_circuit_t *circ,
|
||||
cpuworker_request_t req;
|
||||
int should_time;
|
||||
|
||||
if (1) {
|
||||
if (!circ->p_chan) {
|
||||
log_info(LD_OR,"circ->p_chan gone. Failing circ.");
|
||||
tor_free(onionskin);
|
||||
@ -550,7 +546,7 @@ assign_onionskin_to_cpuworker(or_circuit_t *circ,
|
||||
job, queue_entry, U64_PRINTF_ARG(job->chan_id), job->circ_id);
|
||||
|
||||
circ->workqueue_entry = queue_entry;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user