aboutsummaryrefslogtreecommitdiff
path: root/lib/formdata.c
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2009-11-18 10:33:54 +0000
committerYang Tse <yangsita@gmail.com>2009-11-18 10:33:54 +0000
commit59939313f8452a9d817c178425c2ba3b91798ea9 (patch)
tree2f394dd93b80a64e70c29062ac7adca1fa9e024a /lib/formdata.c
parent961c504ca57b87fa530072f00f7643da77ca4386 (diff)
Make usage of calloc()'s arguments consistent with rest of code base
Diffstat (limited to 'lib/formdata.c')
-rw-r--r--lib/formdata.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/formdata.c b/lib/formdata.c
index f2d556ff2..98058a5fa 100644
--- a/lib/formdata.c
+++ b/lib/formdata.c
@@ -172,7 +172,7 @@ AddHttpPost(char *name, size_t namelength,
struct curl_httppost **last_post)
{
struct curl_httppost *post;
- post = calloc(sizeof(struct curl_httppost), 1);
+ post = calloc(1, sizeof(struct curl_httppost));
if(post) {
post->name = name;
post->namelength = (long)(name?(namelength?namelength:strlen(name)):0);
@@ -223,7 +223,7 @@ static FormInfo * AddFormInfo(char *value,
FormInfo *parent_form_info)
{
FormInfo *form_info;
- form_info = calloc(sizeof(FormInfo), 1);
+ form_info = calloc(1, sizeof(struct FormInfo));
if(form_info) {
if(value)
form_info->value = value;
@@ -411,7 +411,7 @@ CURLFORMcode FormAdd(struct curl_httppost **httppost,
/*
* We need to allocate the first struct to fill in.
*/
- first_form = calloc(sizeof(struct FormInfo), 1);
+ first_form = calloc(1, sizeof(struct FormInfo));
if(!first_form)
return CURL_FORMADD_MEMORY;