]> granicus.if.org Git - curl/commitdiff
tool_formparse: remove redundant assignment
authorMarcel Raad <Marcel.Raad@teamviewer.com>
Sun, 12 May 2019 12:35:22 +0000 (14:35 +0200)
committerMarcel Raad <Marcel.Raad@teamviewer.com>
Mon, 20 May 2019 06:06:24 +0000 (08:06 +0200)
Just initialize word_begin with the correct value.

Closes https://github.com/curl/curl/pull/3873

src/tool_formparse.c

index 51aebd25ac23ba468f272917da268e6416db4d0f..74d1533e41f6eef6100a625027b79987f29e3103 100644 (file)
@@ -347,12 +347,11 @@ CURLcode tool2curlmime(CURL *curl, tool_mime *m, curl_mime **mime)
 static char *get_param_word(char **str, char **end_pos, char endchar)
 {
   char *ptr = *str;
-  char *word_begin = NULL;
+  /* the first non-space char is here */
+  char *word_begin = ptr;
   char *ptr2;
   char *escape = NULL;
 
-  /* the first non-space char is here */
-  word_begin = ptr;
   if(*ptr == '"') {
     ++ptr;
     while(*ptr) {