From: Tim Duesterhus Date: Thu, 4 Mar 2021 22:50:13 +0000 (+0100) Subject: CLEANUP: Replace for loop with only a condition by while X-Git-Tag: v2.4-dev11~33 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1568355afdde5a861550292d6d85888d5cc1a7af;p=thirdparty%2Fhaproxy.git CLEANUP: Replace for loop with only a condition by while Refactoring performed with the following Coccinelle patch: @@ expression e; statement S; @@ - for (;e;) + while (e) S --- diff --git a/src/h2.c b/src/h2.c index 84aa660b70..9ff3c938e7 100644 --- a/src/h2.c +++ b/src/h2.c @@ -535,7 +535,7 @@ int h2_make_htx_request(struct http_hdr *list, struct htx *htx, unsigned int *ms * insert "; " before the new value. */ fs += tl; // first one is already counted - for (; (ck = list[ck].n.len) >= 0 ; ) { + while ((ck = list[ck].n.len) >= 0) { vl = list[ck].v.len; tl += vl + 2; if (tl > fs)