mirror of
https://github.com/moparisthebest/curl
synced 2024-12-21 23:58:49 -05:00
non-ascii: Prefer while loop rather than a do loop
This also removes the need to check that the 'form' argument is valid.
This commit is contained in:
parent
f2a5283cbc
commit
ee9de01665
@ -319,21 +319,21 @@ CURLcode Curl_convert_form(struct SessionHandle *data, struct FormData *form)
|
||||
struct FormData *next;
|
||||
CURLcode result;
|
||||
|
||||
if(!form)
|
||||
return CURLE_OK;
|
||||
|
||||
if(!data)
|
||||
return CURLE_BAD_FUNCTION_ARGUMENT;
|
||||
|
||||
do {
|
||||
next=form->next; /* the following form line */
|
||||
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 */
|
||||
if(result)
|
||||
return result;
|
||||
}
|
||||
} while((form = next) != NULL); /* continue */
|
||||
|
||||
form = next;
|
||||
}
|
||||
|
||||
return CURLE_OK;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user