diff options
author | Nick Mathewson <nickm@torproject.org> | 2014-11-02 11:56:02 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2014-11-02 11:56:02 -0500 |
commit | bbd8d071675c278571c804fd0a71b51e7dfa8d7e (patch) | |
tree | b2e13b638657ae8827ffb72c9b9f42cb97126f4b /src/or/geoip.c | |
parent | ded33cb2c73151e2f02a8a1d520b54e4f1c14072 (diff) | |
download | tor-bbd8d071675c278571c804fd0a71b51e7dfa8d7e.tar.gz tor-bbd8d071675c278571c804fd0a71b51e7dfa8d7e.zip |
Apply new calloc coccinelle patch
Diffstat (limited to 'src/or/geoip.c')
-rw-r--r-- | src/or/geoip.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/or/geoip.c b/src/or/geoip.c index 75b26212d0..c02343d489 100644 --- a/src/or/geoip.c +++ b/src/or/geoip.c @@ -963,7 +963,7 @@ geoip_get_dirreq_history(dirreq_type_t type) /* We may have rounded 'completed' up. Here we want to use the * real value. */ complete = smartlist_len(dirreq_completed); - dltimes = tor_calloc(sizeof(uint32_t), complete); + dltimes = tor_calloc(complete, sizeof(uint32_t)); SMARTLIST_FOREACH_BEGIN(dirreq_completed, dirreq_map_entry_t *, ent) { uint32_t bytes_per_second; uint32_t time_diff = (uint32_t) tv_mdiff(&ent->request_time, @@ -1033,7 +1033,7 @@ geoip_get_client_history(geoip_client_action_t action, if (!geoip_is_loaded(AF_INET) && !geoip_is_loaded(AF_INET6)) return -1; - counts = tor_calloc(sizeof(unsigned), n_countries); + counts = tor_calloc(n_countries, sizeof(unsigned)); HT_FOREACH(ent, clientmap, &client_history) { int country; if ((*ent)->action != (int)action) |