mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-24 04:13:28 +01:00
Silence -Wbad-function-cast warning (when DEBUG_SMARTLIST is on)
This commit is contained in:
parent
3716ddf1b4
commit
9876575d2c
4
changes/bug26283
Normal file
4
changes/bug26283
Normal file
@ -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.
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user