mirror of
https://github.com/curl/curl.git
synced 2026-07-24 15:27:22 +03:00
lib: silence warnings on comma misuse
Building curl with -Wcomma, I see warnings about "possible misuse of comma operator here" and moving fields assignment out of the for() fixes it. Closes #13392
This commit is contained in:
parent
c6655f7029
commit
0b4401a4fb
2 changed files with 4 additions and 2 deletions
|
|
@ -886,7 +886,8 @@ Curl_cookie_add(struct Curl_easy *data,
|
|||
* Now loop through the fields and init the struct we already have
|
||||
* allocated
|
||||
*/
|
||||
for(ptr = firstptr, fields = 0; ptr && !badcookie;
|
||||
fields = 0;
|
||||
for(ptr = firstptr; ptr && !badcookie;
|
||||
ptr = strtok_r(NULL, "\t", &tok_buf), fields++) {
|
||||
switch(fields) {
|
||||
case 0:
|
||||
|
|
|
|||
|
|
@ -546,7 +546,8 @@ static CURLcode ldap_do(struct Curl_easy *data, bool *done)
|
|||
goto quit;
|
||||
}
|
||||
|
||||
for(num = 0, entryIterator = ldap_first_entry(server, ldapmsg);
|
||||
num = 0;
|
||||
for(entryIterator = ldap_first_entry(server, ldapmsg);
|
||||
entryIterator;
|
||||
entryIterator = ldap_next_entry(server, entryIterator), num++) {
|
||||
BerElement *ber = NULL;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue