aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2008-06-09 20:52:59 +0000
committerNick Mathewson <nickm@torproject.org>2008-06-09 20:52:59 +0000
commit55975452b4a36b2766bb2efa10694cfdf8db0a85 (patch)
tree22ab4da87b0be6e8494c966f51cf5d381e3901ab
parentbaa3cea213dae87197991e6d50ff53ef53e8e829 (diff)
downloadtor-55975452b4a36b2766bb2efa10694cfdf8db0a85.tar
tor-55975452b4a36b2766bb2efa10694cfdf8db0a85.tar.gz
r16121@tombo: nickm | 2008-06-09 16:14:39 -0400
fix compile with warnings on osx 10.5: double+int apparently gives a 64-bit value on some gccs svn:r15093
-rw-r--r--src/or/routerlist.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/or/routerlist.c b/src/or/routerlist.c
index 0bc0cc259..f2b60ce4d 100644
--- a/src/or/routerlist.c
+++ b/src/or/routerlist.c
@@ -4189,6 +4189,7 @@ count_usable_descriptors(int *num_present, int *num_usable,
log_debug(LD_DIR, "%d usable, %d present.", *num_usable, *num_present);
}
+/* XXXX021 should this be static? */
int
count_loading_descriptors_progress(void)
{
@@ -4209,9 +4210,9 @@ count_loading_descriptors_progress(void)
fraction = num_present / (num_usable/4.);
if (fraction > 1.0)
return 0; /* it's not the number of descriptors holding us back */
- return BOOTSTRAP_STATUS_LOADING_DESCRIPTORS +
- fraction*(BOOTSTRAP_STATUS_CONN_OR-1 -
- BOOTSTRAP_STATUS_LOADING_DESCRIPTORS);
+ return BOOTSTRAP_STATUS_LOADING_DESCRIPTORS + (int)
+ (fraction*(BOOTSTRAP_STATUS_CONN_OR-1 -
+ BOOTSTRAP_STATUS_LOADING_DESCRIPTORS));
}
/** Change the value of have_min_dir_info, setting it true iff we have enough