]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
remove some dead code, found by coverity
authorSebastian Hahn <sebastian@torproject.org>
Wed, 8 Jun 2011 18:02:16 +0000 (20:02 +0200)
committerSebastian Hahn <sebastian@torproject.org>
Wed, 8 Jun 2011 19:07:54 +0000 (21:07 +0200)
changes/coverity_maint [new file with mode: 0644]
src/or/rephist.c

diff --git a/changes/coverity_maint b/changes/coverity_maint
new file mode 100644 (file)
index 0000000..ec25d09
--- /dev/null
@@ -0,0 +1,3 @@
+  o Code simplifications and refactoring:
+    - Remove some dead code as indicated by coverity.
+
index 6be8484cc5b989970a38111179209652378ede12..242fe81d52227cc58e26558ce79cf9d2ae453c80 100644 (file)
@@ -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 /