Remove an erroneous 0.5 in compute_weighted_bandwidths()
commit3c03e237ab372f495fa2498e925813931ba381da
authorNick Mathewson <nickm@torproject.org>
Fri, 22 Sep 2017 19:29:15 +0000 (22 15:29 -0400)
committerNick Mathewson <nickm@torproject.org>
Wed, 8 Nov 2017 15:45:18 +0000 (8 10:45 -0500)
tree01dcb809cff24a7bf4e3ced8fd5862d4707ea5d5
parent04d4786cc40b2d80b4cd34e7d5339b0100861c8f
Remove an erroneous 0.5 in compute_weighted_bandwidths()

Back in 0.2.4.3-alpha (e106812a778f537), when we switched from using
double to using uint64 for selecting by bandwidth, I got the math
wrong: I should have used llround(x), or (uint64_t)(x+0.5), but
instead I wrote llround(x+0.5).  That means we would always round
up, rather than rounding to the closest integer

Fixes bug 23318; bugfix on 0.2.4.3-alpha.
changes/bug23318 [new file with mode: 0644]
src/or/routerlist.c