summaryrefslogtreecommitdiff
path: root/src/or/dirserv.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2014-11-02 11:56:02 -0500
committerNick Mathewson <nickm@torproject.org>2014-11-02 11:56:02 -0500
commitbbd8d071675c278571c804fd0a71b51e7dfa8d7e (patch)
treeb2e13b638657ae8827ffb72c9b9f42cb97126f4b /src/or/dirserv.c
parentded33cb2c73151e2f02a8a1d520b54e4f1c14072 (diff)
downloadtor-bbd8d071675c278571c804fd0a71b51e7dfa8d7e.tar.gz
tor-bbd8d071675c278571c804fd0a71b51e7dfa8d7e.zip
Apply new calloc coccinelle patch
Diffstat (limited to 'src/or/dirserv.c')
-rw-r--r--src/or/dirserv.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/or/dirserv.c b/src/or/dirserv.c
index ec9af07ecb..730f005a96 100644
--- a/src/or/dirserv.c
+++ b/src/or/dirserv.c
@@ -1369,18 +1369,18 @@ dirserv_compute_performance_thresholds(routerlist_t *rl,
* sort them and use that to compute thresholds. */
n_active = n_active_nonexit = 0;
/* Uptime for every active router. */
- uptimes = tor_calloc(sizeof(uint32_t), smartlist_len(rl->routers));
+ uptimes = tor_calloc(smartlist_len(rl->routers), sizeof(uint32_t));
/* Bandwidth for every active router. */
- bandwidths_kb = tor_calloc(sizeof(uint32_t), smartlist_len(rl->routers));
+ bandwidths_kb = tor_calloc(smartlist_len(rl->routers), sizeof(uint32_t));
/* Bandwidth for every active non-exit router. */
bandwidths_excluding_exits_kb =
- tor_calloc(sizeof(uint32_t), smartlist_len(rl->routers));
+ tor_calloc(smartlist_len(rl->routers), sizeof(uint32_t));
/* Weighted mean time between failure for each active router. */
- mtbfs = tor_calloc(sizeof(double), smartlist_len(rl->routers));
+ mtbfs = tor_calloc(smartlist_len(rl->routers), sizeof(double));
/* Time-known for each active router. */
- tks = tor_calloc(sizeof(long), smartlist_len(rl->routers));
+ tks = tor_calloc(smartlist_len(rl->routers), sizeof(long));
/* Weighted fractional uptime for each active router. */
- wfus = tor_calloc(sizeof(double), smartlist_len(rl->routers));
+ wfus = tor_calloc(smartlist_len(rl->routers), sizeof(double));
nodelist_assert_ok();