From 1c3e8bbfedcd3822aeb1bab22fb56c5ecff4295b Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 14 Dec 2016 01:29:44 +0100 Subject: checksrc: warn for assignments within if() expressions ... they're already frowned upon in our source code style guide, this now enforces the rule harder. --- lib/formdata.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'lib/formdata.c') diff --git a/lib/formdata.c b/lib/formdata.c index 53dee39f4..abd2da075 100644 --- a/lib/formdata.c +++ b/lib/formdata.c @@ -949,8 +949,8 @@ void Curl_formclean(struct FormData **form_ptr) if(form->type <= FORM_CONTENT) free(form->line); /* free the line */ free(form); /* free the struct */ - - } while((form = next) != NULL); /* continue */ + form = next; + } while(form); /* continue */ *form_ptr = NULL; } @@ -1031,8 +1031,8 @@ void curl_formfree(struct curl_httppost *form) free(form->contenttype); /* free the content type */ free(form->showfilename); /* free the faked file name */ free(form); /* free the struct */ - - } while((form = next) != NULL); /* continue */ + form = next; + } while(form); /* continue */ } #ifndef HAVE_BASENAME @@ -1374,8 +1374,8 @@ CURLcode Curl_getformdata(struct Curl_easy *data, if(result) break; } - - } while((post = post->next) != NULL); /* for each field */ + post = post->next; + } while(post); /* for each field */ /* end-boundary for everything */ if(!result) -- cgit v1.2.3