]> granicus.if.org Git - curl/commitdiff
tool_formparse: fix some trivial warnings
authorJay Satiro <raysatiro@yahoo.com>
Sun, 3 Sep 2017 16:13:44 +0000 (12:13 -0400)
committerJay Satiro <raysatiro@yahoo.com>
Sun, 3 Sep 2017 16:13:44 +0000 (12:13 -0400)
src/tool_formparse.c

index fc5162eed1a6f169989c86dbaf315e3cfd72aa73..de83d6e05a8d89b8533553f964ce4a57c2b13f91 100644 (file)
@@ -352,8 +352,6 @@ static int get_param_part(struct OperationConfig *config, char **str,
  * Else use curl_mime_filedata(). */
 static CURLcode file_or_stdin(curl_mimepart *part, const char *file)
 {
-  CURLcode ret = CURLE_OK;
-
   if(strcmp(file, "-"))
     return curl_mime_filedata(part, file);
 
@@ -671,7 +669,7 @@ int formparse(struct OperationConfig *config,
         }
 #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");
           Curl_safefree(contents);
           return 26;
@@ -697,7 +695,7 @@ int formparse(struct OperationConfig *config,
     }
 
     /* 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");
       Curl_safefree(contents);
       return 29;