]> granicus.if.org Git - curl/commitdiff
non-ascii: Reduce variable usage
authorSteve Holme <steve_holme@hotmail.com>
Fri, 19 Dec 2014 20:41:47 +0000 (20:41 +0000)
committerSteve Holme <steve_holme@hotmail.com>
Sat, 20 Dec 2014 14:43:02 +0000 (14:43 +0000)
Removed 'next' variable in Curl_convert_form(). Rather than setting it
from 'form->next' and using that to set 'form' after the conversion
just use 'form = form->next' instead.

lib/non-ascii.c

index 6c0f9e5a44473cd8e48896234c6af8f1e227ecec..6ccb4499e76412803e26ed5b8989e78bc38e1aa1 100644 (file)
@@ -316,14 +316,12 @@ void Curl_convert_close(struct SessionHandle *data)
  */
 CURLcode Curl_convert_form(struct SessionHandle *data, struct FormData *form)
 {
-  struct FormData *next;
   CURLcode result;
 
   if(!data)
     return CURLE_BAD_FUNCTION_ARGUMENT;
 
   while(form) {
-    next = form->next;  /* the following form line */
     if(form->type == FORM_DATA) {
       result = Curl_convert_to_network(data, form->line, form->length);
       /* Curl_convert_to_network calls failf if unsuccessful */
@@ -331,7 +329,7 @@ CURLcode Curl_convert_form(struct SessionHandle *data, struct FormData *form)
         return result;
     }
 
-    form = next;
+    form = form->next;
   }
 
   return CURLE_OK;