1
0
mirror of https://github.com/moparisthebest/curl synced 2024-11-10 11:35:07 -05:00

tool_formparse: fix some trivial warnings

This commit is contained in:
Jay Satiro 2017-09-03 12:13:44 -04:00
parent efd9301426
commit 437475901d

View File

@ -352,8 +352,6 @@ static int get_param_part(struct OperationConfig *config, char **str,
* Else use curl_mime_filedata(). */ * Else use curl_mime_filedata(). */
static CURLcode file_or_stdin(curl_mimepart *part, const char *file) static CURLcode file_or_stdin(curl_mimepart *part, const char *file)
{ {
CURLcode ret = CURLE_OK;
if(strcmp(file, "-")) if(strcmp(file, "-"))
return curl_mime_filedata(part, file); return curl_mime_filedata(part, file);
@ -671,7 +669,7 @@ int formparse(struct OperationConfig *config,
} }
#endif #endif
if(curl_mime_data(part, data, -1)) { if(curl_mime_data(part, data, CURL_ZERO_TERMINATED)) {
warnf(config->global, "curl_mime_data failed!\n"); warnf(config->global, "curl_mime_data failed!\n");
Curl_safefree(contents); Curl_safefree(contents);
return 26; return 26;
@ -697,7 +695,7 @@ int formparse(struct OperationConfig *config,
} }
/* Set part name. */ /* Set part name. */
if(name && curl_mime_name(part, name, -1)) { if(name && curl_mime_name(part, name, CURL_ZERO_TERMINATED)) {
warnf(config->global, "curl_mime_name failed!\n"); warnf(config->global, "curl_mime_name failed!\n");
Curl_safefree(contents); Curl_safefree(contents);
return 29; return 29;