diff options
author | Sebastian Hahn <sebastian@torproject.org> | 2011-06-08 20:02:16 +0200 |
---|---|---|
committer | Sebastian Hahn <sebastian@torproject.org> | 2011-06-08 21:07:54 +0200 |
commit | db7dd3ee7a07d9bc121d1c8f353e206327bb72c5 (patch) | |
tree | 6f6c839d71fa6334e076b584712a502f6c7031b7 | |
parent | 9e3fc5f61685f937d76e60c5fa1781b80aa5bf68 (diff) | |
download | tor-db7dd3ee7a07d9bc121d1c8f353e206327bb72c5.tar.gz tor-db7dd3ee7a07d9bc121d1c8f353e206327bb72c5.zip |
remove some dead code, found by coverity
-rw-r--r-- | changes/coverity_maint | 3 | ||||
-rw-r--r-- | src/or/rephist.c | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/changes/coverity_maint b/changes/coverity_maint new file mode 100644 index 0000000000..ec25d097e1 --- /dev/null +++ b/changes/coverity_maint @@ -0,0 +1,3 @@ + o Code simplifications and refactoring: + - Remove some dead code as indicated by coverity. + diff --git a/src/or/rephist.c b/src/or/rephist.c index 6be8484cc5..242fe81d52 100644 --- a/src/or/rephist.c +++ b/src/or/rephist.c @@ -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->processed_cells = orcirc->processed_cells; /* 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 : - (double) orcirc->total_cell_waiting_time / + stat->mean_num_cells_in_queue = (double) orcirc->total_cell_waiting_time / (double) interval_length / 1000.0 / 2.0; stat->mean_time_cells_in_queue = (double) orcirc->total_cell_waiting_time / |