Refactoring performed with the following Coccinelle patch:
@@
expression e;
statement S;
@@
- for (;e;)
+ while (e)
S
---
src/h2.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/h2.c b/src/h2.c
index 84aa660b7..9ff3c938e 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)
--
2.30.1