lib: fix some type mismatches and remove unneeded typecasts

Many of these castings are unneeded if we change the variables to work
better with each other.

Ref: https://github.com/curl/curl/pull/9823

Closes https://github.com/curl/curl/pull/9835
This commit is contained in:
Rose 2022-10-28 12:32:09 -04:00 committed by Jay Satiro
parent 14061f784c
commit f151ec6c10
23 changed files with 66 additions and 66 deletions

View file

@ -135,15 +135,13 @@ static struct FormInfo *AddFormInfo(char *value,
{
struct FormInfo *form_info;
form_info = calloc(1, sizeof(struct FormInfo));
if(form_info) {
if(value)
form_info->value = value;
if(contenttype)
form_info->contenttype = contenttype;
form_info->flags = HTTPPOST_FILENAME;
}
else
if(!form_info)
return NULL;
if(value)
form_info->value = value;
if(contenttype)
form_info->contenttype = contenttype;
form_info->flags = HTTPPOST_FILENAME;
if(parent_form_info) {
/* now, point our 'more' to the original 'more' */