[master] 7b61372c1 try to make flexelint happy

Nils Goroll nils.goroll at uplex.de
Thu Apr 9 13:45:08 UTC 2020


commit 7b61372c14e4ee5cb9077d88f2344a1aa54aa22e
Author: Nils Goroll <nils.goroll at uplex.de>
Date:   Thu Apr 9 15:26:46 2020 +0200

    try to make flexelint happy
    
                    if (e - p < l1 + l2)
    ../../lib/libvarnishapi/vsl_arg.c  133  Info 776: Possible truncation of
        addition

diff --git a/lib/libvarnishapi/vsl_arg.c b/lib/libvarnishapi/vsl_arg.c
index 25e811424..87fbace64 100644
--- a/lib/libvarnishapi/vsl_arg.c
+++ b/lib/libvarnishapi/vsl_arg.c
@@ -130,7 +130,7 @@ VSL_Glob2Tags(const char *glob, int l, VSL_tagfind_f *func, void *priv)
 		if (p == NULL)
 			continue;
 		e = strchr(p, '\0');
-		if (e - p < l1 + l2)
+		if (e - p - l1 < l2)
 			continue;
 		if (p1 != NULL && strncasecmp(p, p1, l1))
 			continue;


More information about the varnish-commit mailing list