소스 검색

add a comment so i stop worrying

svn:r9532
Roger Dingledine 18 년 전
부모
커밋
90b53beec5
1개의 변경된 파일2개의 추가작업 그리고 0개의 파일을 삭제
  1. 2 0
      src/or/routerlist.c

+ 2 - 0
src/or/routerlist.c

@@ -1008,6 +1008,8 @@ smartlist_choose_by_bandwidth(smartlist_t *sl, int for_exit, int statuses)
   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 {