mirror of
https://github.com/curl/curl.git
synced 2026-08-25 20:13:35 +03:00
remove unnecessary typecasting of calloc()
This commit is contained in:
parent
861b647e7b
commit
a622fd90b4
15 changed files with 25 additions and 27 deletions
|
|
@ -171,7 +171,7 @@ AddHttpPost(char *name, size_t namelength,
|
|||
struct curl_httppost **last_post)
|
||||
{
|
||||
struct curl_httppost *post;
|
||||
post = (struct curl_httppost *)calloc(sizeof(struct curl_httppost), 1);
|
||||
post = calloc(sizeof(struct curl_httppost), 1);
|
||||
if(post) {
|
||||
post->name = name;
|
||||
post->namelength = (long)(name?(namelength?namelength:strlen(name)):0);
|
||||
|
|
@ -410,7 +410,7 @@ CURLFORMcode FormAdd(struct curl_httppost **httppost,
|
|||
/*
|
||||
* We need to allocate the first struct to fill in.
|
||||
*/
|
||||
first_form = (FormInfo *)calloc(sizeof(struct FormInfo), 1);
|
||||
first_form = calloc(sizeof(struct FormInfo), 1);
|
||||
if(!first_form)
|
||||
return CURL_FORMADD_MEMORY;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue