summaryrefslogtreecommitdiff
path: root/src/or/circuitstats.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/circuitstats.c
parentded33cb2c73151e2f02a8a1d520b54e4f1c14072 (diff)
downloadtor-bbd8d071675c278571c804fd0a71b51e7dfa8d7e.tar.gz
tor-bbd8d071675c278571c804fd0a71b51e7dfa8d7e.zip
Apply new calloc coccinelle patch
Diffstat (limited to 'src/or/circuitstats.c')
-rw-r--r--src/or/circuitstats.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/or/circuitstats.c b/src/or/circuitstats.c
index 956c969db6..a136278e58 100644
--- a/src/or/circuitstats.c
+++ b/src/or/circuitstats.c
@@ -404,7 +404,7 @@ circuit_build_times_new_consensus_params(circuit_build_times_t *cbt,
* distress anyway, so memory correctness here is paramount over
* doing acrobatics to preserve the array.
*/
- recent_circs = tor_calloc(sizeof(int8_t), num);
+ recent_circs = tor_calloc(num, sizeof(int8_t));
if (cbt->liveness.timeouts_after_firsthop &&
cbt->liveness.num_recent_circs > 0) {
memcpy(recent_circs, cbt->liveness.timeouts_after_firsthop,
@@ -508,7 +508,7 @@ circuit_build_times_init(circuit_build_times_t *cbt)
cbt->liveness.num_recent_circs =
circuit_build_times_recent_circuit_count(NULL);
cbt->liveness.timeouts_after_firsthop =
- tor_calloc(sizeof(int8_t), cbt->liveness.num_recent_circs);
+ tor_calloc(cbt->liveness.num_recent_circs, sizeof(int8_t));
} else {
cbt->liveness.num_recent_circs = 0;
cbt->liveness.timeouts_after_firsthop = NULL;
@@ -873,7 +873,7 @@ circuit_build_times_parse_state(circuit_build_times_t *cbt,
}
/* build_time_t 0 means uninitialized */
- loaded_times = tor_calloc(sizeof(build_time_t), state->TotalBuildTimes);
+ loaded_times = tor_calloc(state->TotalBuildTimes, sizeof(build_time_t));
for (line = state->BuildtimeHistogram; line; line = line->next) {
smartlist_t *args = smartlist_new();