[master] b92430cc9 Eliminate now unused `cache_shutdown` variable

Poul-Henning Kamp phk at FreeBSD.org
Wed Aug 10 08:01:11 UTC 2022


commit b92430cc958bbd09260cf65d40834af434814e13
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Wed Aug 10 08:00:59 2022 +0000

    Eliminate now unused `cache_shutdown` variable

diff --git a/bin/varnishd/cache/cache_main.c b/bin/varnishd/cache/cache_main.c
index ddcc8d8cd..b8a8174e1 100644
--- a/bin/varnishd/cache/cache_main.c
+++ b/bin/varnishd/cache/cache_main.c
@@ -54,8 +54,6 @@
 
 #include "hash/hash_slinger.h"
 
-int cache_shutdown = 0;
-
 volatile struct params		*cache_param;
 static pthread_mutex_t		cache_vrnd_mtx;
 static vtim_dur			shutdown_delay = 0;
@@ -453,8 +451,6 @@ child_main(int sigmagic, size_t altstksz)
 
 	CLI_Run();
 
-	cache_shutdown = 1;
-
 	if (shutdown_delay > 0)
 		VTIM_sleep(shutdown_delay);
 
diff --git a/bin/varnishd/cache/cache_varnishd.h b/bin/varnishd/cache/cache_varnishd.h
index f5c377448..b9d60fc65 100644
--- a/bin/varnishd/cache/cache_varnishd.h
+++ b/bin/varnishd/cache/cache_varnishd.h
@@ -243,7 +243,6 @@ void EXP_Rearm(struct objcore *oc, vtim_real now,
     vtim_dur ttl, vtim_dur grace, vtim_dur keep);
 
 /* From cache_main.c */
-extern int cache_shutdown;
 void BAN_Init(void);
 void BAN_Compile(void);
 void BAN_Shutdown(void);


More information about the varnish-commit mailing list