[master] ad152231f Signed/unsigned fix, spotted by FlexeLint

Poul-Henning Kamp phk at FreeBSD.org
Mon Aug 30 10:27:05 UTC 2021


commit ad152231fd0477b43f3061e573c1e8ead1af5940
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Mon Aug 30 10:25:53 2021 +0000

    Signed/unsigned fix, spotted by FlexeLint

diff --git a/bin/varnishd/http2/cache_http2_proto.c b/bin/varnishd/http2/cache_http2_proto.c
index fe65b32db..d77fd0596 100644
--- a/bin/varnishd/http2/cache_http2_proto.c
+++ b/bin/varnishd/http2/cache_http2_proto.c
@@ -761,7 +761,8 @@ static h2_error v_matchproto_(h2_rxframe_f)
 h2_rx_data(struct worker *wrk, struct h2_sess *h2, struct h2_req *r2)
 {
 	char buf[4];
-	uint64_t l, l2, head;
+	ssize_t l;
+	uint64_t l2, head;
 	const uint8_t *src;
 	unsigned len;
 
@@ -999,7 +1000,8 @@ h2_vfp_body(struct vfp_ctx *vc, struct vfp_entry *vfe, void *ptr, ssize_t *lp)
 	struct h2_req *r2;
 	struct h2_sess *h2;
 	enum vfp_status retval;
-	uint64_t l, l2, tail;
+	ssize_t l, l2;
+	uint64_t tail;
 	uint8_t *dst;
 	char buf[4];
 	int i;


More information about the varnish-commit mailing list