From 27af2ec219244bef24e6d11649d41aad3668da45 Mon Sep 17 00:00:00 2001 From: Marcel Raad Date: Sun, 12 May 2019 14:35:22 +0200 Subject: [PATCH] tool_formparse: remove redundant assignment Just initialize word_begin with the correct value. Closes https://github.com/curl/curl/pull/3873 --- src/tool_formparse.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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) {