[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] r9532: add a comment so i stop worrying (tor/trunk/src/or)
Author: arma
Date: 2007-02-08 15:27:58 -0500 (Thu, 08 Feb 2007)
New Revision: 9532
Modified:
tor/trunk/src/or/routerlist.c
Log:
add a comment so i stop worrying
Modified: tor/trunk/src/or/routerlist.c
===================================================================
--- tor/trunk/src/or/routerlist.c 2007-02-08 19:44:55 UTC (rev 9531)
+++ tor/trunk/src/or/routerlist.c 2007-02-08 20:27:58 UTC (rev 9532)
@@ -1008,6 +1008,8 @@
if (n_unknown) {
int32_t avg_fast, avg_slow;
if (total_exit_bw+total_nonexit_bw) {
+ /* if there's some bandwidth, there's at least one known router,
+ * so no worries about div by 0 here */
avg_fast = avg_slow =
(total_exit_bw+total_nonexit_bw)/(smartlist_len(sl)-n_unknown);
} else {