[master] 6f4d0ec16 re-apply tools/coccinelle/replace.cocci

Nils Goroll nils.goroll at uplex.de
Tue Feb 9 16:15:10 UTC 2021


commit 6f4d0ec16741468e6ff1842cc6dcfcdcfc36c3cf
Author: Nils Goroll <nils.goroll at uplex.de>
Date:   Tue Feb 9 17:01:50 2021 +0100

    re-apply tools/coccinelle/replace.cocci

diff --git a/bin/varnishtest/vtc.c b/bin/varnishtest/vtc.c
index 017c53950..87c58e7f5 100644
--- a/bin/varnishtest/vtc.c
+++ b/bin/varnishtest/vtc.c
@@ -111,13 +111,11 @@ macro_def_int(const char *name, const char *fmt, va_list ap)
 		ALLOC_OBJ(m, MACRO_MAGIC);
 		AN(m);
 		REPLACE(m->name, name);
-		AN(m->name);
 		VTAILQ_INSERT_TAIL(&macro_list, m, list);
 	}
 	AN(m);
 	vbprintf(buf, fmt, ap);
 	REPLACE(m->val, buf);
-	AN(m->val);
 	return (m);
 }
 
diff --git a/bin/varnishtest/vtc_http.c b/bin/varnishtest/vtc_http.c
index dc286066a..81c5c516a 100644
--- a/bin/varnishtest/vtc_http.c
+++ b/bin/varnishtest/vtc_http.c
@@ -807,7 +807,6 @@ http_tx_parse_args(char * const *av, struct vtclog *vl, struct http *hp,
 			assert(body == nullbody);
 			REPLACE(body, av[1]);
 
-			AN(body);
 			av++;
 			bodylen = strlen(body);
 			for (b = body; *b != '\0'; b++) {
diff --git a/bin/varnishtest/vtc_http2.c b/bin/varnishtest/vtc_http2.c
index f2deff037..b37ae0874 100644
--- a/bin/varnishtest/vtc_http2.c
+++ b/bin/varnishtest/vtc_http2.c
@@ -1548,7 +1548,6 @@ cmd_tx11obj(CMD_ARGS)
 			if (AV_IS("-body")) {
 				AZ(body);
 				REPLACE(body, av[1]);
-				AN(body);
 				bodylen = strlen(body);
 				f.flags &= ~END_STREAM;
 				av++;
@@ -2580,7 +2579,6 @@ stream_new(const char *name, struct http *h)
 	AN(s);
 	AZ(pthread_cond_init(&s->cond, NULL));
 	REPLACE(s->name, name);
-	AN(s->name);
 	VTAILQ_INIT(&s->fq);
 	s->ws = h->iws;
 	s->vl = vtc_logopen("%s.%s", h->sess->name, name);


More information about the varnish-commit mailing list