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 | 10461d141401e9ffcdce63efaf03541c66edc210 (patch) | |
tree | a96d676b1066cecd5cf0c1a6df7473d3b787aebd | |
parent | f157b574a9e99c4890b0ab760df9c05cfbac7bfb (diff) | |
download | c-ares-10461d141401e9ffcdce63efaf03541c66edc210.tar.gz c-ares-10461d141401e9ffcdce63efaf03541c66edc210.tar.bz2 c-ares-10461d141401e9ffcdce63efaf03541c66edc210.zip |
Make usage of calloc()'s arguments consistent with rest of code base
-rw-r--r-- | ares_init.c | 2 | ||||
-rw-r--r-- | ares_process.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/ares_init.c b/ares_init.c index 92537ab..028b145 100644 --- a/ares_init.c +++ b/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_process.c b/ares_process.c index 0bc3985..5df0f60 100644 --- a/ares_process.c +++ b/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); |