From: Marcel Raad Date: Sun, 12 May 2019 12:35:22 +0000 (+0200) Subject: tool_formparse: remove redundant assignment X-Git-Tag: curl-7_65_0~12 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=27af2ec219244bef24e6d11649d41aad3668da45;p=curl tool_formparse: remove redundant assignment Just initialize word_begin with the correct value. Closes https://github.com/curl/curl/pull/3873 --- diff --git a/src/tool_formparse.c b/src/tool_formparse.c index 51aebd25a..74d1533e4 100644 --- a/src/tool_formparse.c +++ b/src/tool_formparse.c @@ -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) {