瀏覽代碼

Merge remote-tracking branch 'rl1987/bug26283'

Nick Mathewson 6 年之前
父節點
當前提交
f4e51990b9
共有 2 個文件被更改,包括 5 次插入1 次删除
  1. 4 0
      changes/bug26283
  2. 1 1
      src/or/routerlist.c

+ 4 - 0
changes/bug26283

@@ -0,0 +1,4 @@
+  o Minor bugfixes (C correctness):
+    - Avoid casting return value of smartlist_len() to double as
+      compiler does not like it when -Wbad-function-cast is on.
+      Fixes bug 26283; bugfix on 0.2.4.10-alpha.

+ 1 - 1
src/or/routerlist.c

@@ -2764,7 +2764,7 @@ frac_nodes_with_descriptors(const smartlist_t *sl,
       if (node_has_any_descriptor(node))
         n_with_descs++;
     });
-    return ((double)n_with_descs) / (double)smartlist_len(sl);
+    return ((double)n_with_descs) / smartlist_len(sl);
   }
 
   present = 0.0;