[master] 9db32058b Kill dead assert

Dridi Boukelmoune dridi.boukelmoune at gmail.com
Tue Mar 3 11:12:06 UTC 2020


commit 9db32058b4a98738dc26eded0cf5959719dc9fc1
Author: Dridi Boukelmoune <dridi.boukelmoune at gmail.com>
Date:   Tue Mar 3 12:07:40 2020 +0100

    Kill dead assert
    
    The havemsg variable is purely local, and only written-then-read once.

diff --git a/bin/varnishd/cache/cache_vcl.c b/bin/varnishd/cache/cache_vcl.c
index 6064a9c08..0c8e221fb 100644
--- a/bin/varnishd/cache/cache_vcl.c
+++ b/bin/varnishd/cache/cache_vcl.c
@@ -175,7 +175,7 @@ VCL_Rel_CliCtx(struct vrt_ctx **ctx)
 static int
 vcl_send_event(struct vcl *vcl, enum vcl_event_e ev, struct vsb **msg)
 {
-	int r, havemsg = 0;
+	int r, havemsg;
 	unsigned method = 0;
 	struct vrt_ctx *ctx;
 
@@ -197,7 +197,7 @@ vcl_send_event(struct vcl *vcl, enum vcl_event_e ev, struct vsb **msg)
 		method = VCL_MET_FINI;
 		/* FALLTHROUGH */
 	case VCL_EVENT_COLD:
-		AZ(havemsg);
+		havemsg = 0;
 		break;
 	default:
 		WRONG("vcl_event");


More information about the varnish-commit mailing list