1
0
mirror of https://github.com/moparisthebest/curl synced 2024-08-13 17:03:50 -04: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:
Steve Holme 2014-12-19 20:38:26 +00:00
parent f2a5283cbc
commit ee9de01665

View File

@ -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;
}