mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-28 14:23:30 +01:00
remove some dead code, found by coverity
This commit is contained in:
parent
9e3fc5f616
commit
db7dd3ee7a
3
changes/coverity_maint
Normal file
3
changes/coverity_maint
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
o Code simplifications and refactoring:
|
||||||
|
- Remove some dead code as indicated by coverity.
|
||||||
|
|
@ -2401,8 +2401,7 @@ rep_hist_buffer_stats_add_circ(circuit_t *circ, time_t end_of_interval)
|
|||||||
stat = tor_malloc_zero(sizeof(circ_buffer_stats_t));
|
stat = tor_malloc_zero(sizeof(circ_buffer_stats_t));
|
||||||
stat->processed_cells = orcirc->processed_cells;
|
stat->processed_cells = orcirc->processed_cells;
|
||||||
/* 1000.0 for s -> ms; 2.0 because of app-ward and exit-ward queues */
|
/* 1000.0 for s -> ms; 2.0 because of app-ward and exit-ward queues */
|
||||||
stat->mean_num_cells_in_queue = interval_length == 0 ? 0.0 :
|
stat->mean_num_cells_in_queue = (double) orcirc->total_cell_waiting_time /
|
||||||
(double) orcirc->total_cell_waiting_time /
|
|
||||||
(double) interval_length / 1000.0 / 2.0;
|
(double) interval_length / 1000.0 / 2.0;
|
||||||
stat->mean_time_cells_in_queue =
|
stat->mean_time_cells_in_queue =
|
||||||
(double) orcirc->total_cell_waiting_time /
|
(double) orcirc->total_cell_waiting_time /
|
||||||
|
Loading…
Reference in New Issue
Block a user