[BACK]Return to patch-plugins_jwsgi_jwsgi__plugin.c CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / pkgsrc / www / py-uwsgi / patches

File: [cvs.NetBSD.org] / pkgsrc / www / py-uwsgi / patches / Attic / patch-plugins_jwsgi_jwsgi__plugin.c (download)

Revision 1.1, Mon Jan 11 22:57:00 2016 UTC (2 years, 7 months ago) by joerg
Branch: MAIN
CVS Tags: pkgsrc-2016Q3-base, pkgsrc-2016Q3, pkgsrc-2016Q2-base, pkgsrc-2016Q2, pkgsrc-2016Q1-base, pkgsrc-2016Q1

Avoid incrementing the same variable in the for body and at the end of
the loop. The code is correct, but triggers a useful clang 3.8 warning.

$NetBSD: patch-plugins_jwsgi_jwsgi__plugin.c,v 1.1 2016/01/11 22:57:00 joerg Exp $

--- plugins/jwsgi/jwsgi_plugin.c.orig	2016-01-11 16:11:52.000000000 +0000
+++ plugins/jwsgi/jwsgi_plugin.c
@@ -71,13 +71,12 @@ static int uwsgi_jwsgi_request(struct ws
 	if (!hm) return -1;
 
 	int i;
-	for(i=0;i<wsgi_req->var_cnt;i++) {
+	for(i=0;i<wsgi_req->var_cnt;i+=) {
                 char *hk = wsgi_req->hvec[i].iov_base;
                 uint16_t hk_l = wsgi_req->hvec[i].iov_len;
                 char *hv = wsgi_req->hvec[i+1].iov_base;
                 uint16_t hv_l = wsgi_req->hvec[i+1].iov_len;
 		if (uwsgi_jwsgi_add_request_item(hm, hk, hk_l, hv, hv_l)) goto end;
-		i++;
 	}
 
 	if (uwsgi_jwsgi_add_request_input(hm, "jwsgi.input", 11)) goto end;