summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2010-02-25 17:00:14 -0500
committerNick Mathewson <nickm@torproject.org>2010-02-25 17:00:14 -0500
commit512cebadad978e1f5ef87081f15bd25f8b7a4a7e (patch)
treefffe72a8dd44d05937483a79399a15c710eaf1d5
parentf0b5f87eab1845cc54fadb50aa61ee497d4d8460 (diff)
downloadtor-512cebadad978e1f5ef87081f15bd25f8b7a4a7e.tar.gz
tor-512cebadad978e1f5ef87081f15bd25f8b7a4a7e.zip
For integers, if !(E<G), then we can infer that E>=G.
This means that "if (E<G) {abc} else if (E>=G) {def}" can be replaced with "if (E<G) {abc} else {def}" Doing the second test explicitly made my mingw gcc nervous that we might never be initializing casename.
-rw-r--r--src/or/dirvote.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/or/dirvote.c b/src/or/dirvote.c
index 505af38cfc..706e6e4480 100644
--- a/src/or/dirvote.c
+++ b/src/or/dirvote.c
@@ -842,7 +842,7 @@ networkstatus_compute_bw_weights_v9(smartlist_t *chunks, int64_t G, int64_t M,
casename = "Case 2a (E scarce)";
Wed = weight_scale;
Wgd = 0;
- } else if (E >= G) {
+ } else { /* E >= G */
casename = "Case 2a (G scarce)";
Wed = 0;
Wgd = weight_scale;