diff options
author | Yang Tse <yangsita@gmail.com> | 2009-11-18 10:33:54 +0000 |
---|---|---|
committer | Yang Tse <yangsita@gmail.com> | 2009-11-18 10:33:54 +0000 |
commit | 59939313f8452a9d817c178425c2ba3b91798ea9 (patch) | |
tree | 2f394dd93b80a64e70c29062ac7adca1fa9e024a /ares | |
parent | 961c504ca57b87fa530072f00f7643da77ca4386 (diff) | |
download | curl-59939313f8452a9d817c178425c2ba3b91798ea9.tar.gz |
Make usage of calloc()'s arguments consistent with rest of code base
Diffstat (limited to 'ares')
-rw-r--r-- | ares/ares_init.c | 2 | ||||
-rw-r--r-- | ares/ares_process.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/ares/ares_init.c b/ares/ares_init.c index 92537ab14..028b1453e 100644 --- a/ares/ares_init.c +++ b/ares/ares_init.c @@ -797,7 +797,7 @@ DhcpNameServer return ARES_SUCCESS; /* use localhost DNS server */ nservers = i; - servers = calloc(sizeof(*servers), i); + servers = calloc(i, sizeof(struct server_state)); if (!servers) return ARES_ENOMEM; diff --git a/ares/ares_process.c b/ares/ares_process.c index 0bc3985d8..5df0f60bd 100644 --- a/ares/ares_process.c +++ b/ares/ares_process.c @@ -732,7 +732,7 @@ void ares__send_query(ares_channel channel, struct query *query, return; } } - sendreq = calloc(sizeof(struct send_request), 1); + sendreq = calloc(1, sizeof(struct send_request)); if (!sendreq) { end_query(channel, query, ARES_ENOMEM, NULL, 0); |