From 8192bfcf975ff6275505c99193a23e2a066927d0 Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Thu, 9 Nov 2017 16:12:10 +0100 Subject: [PATCH] varnish plugin: Avoid unused variable even harder. ;-) --- src/varnish.c | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/src/varnish.c b/src/varnish.c index ebc8e7aa..d105b025 100644 --- a/src/varnish.c +++ b/src/varnish.c @@ -160,22 +160,15 @@ static int varnish_monitor(void *priv, name = namebuff; #elif HAVE_VARNISH_V4 - const char *class; - - class = pt->section->fantom->type; - name = pt->desc->name; - - if (strcmp(class, "MAIN") != 0) + if (strcmp(pt->section->fantom->type, "MAIN") != 0) return 0; + name = pt->desc->name; #elif HAVE_VARNISH_V3 - const char *class; + if (strcmp(pt->class, "") != 0) + return 0; - class = pt->class; name = pt->name; - - if (strcmp(class, "") != 0) - return 0; #endif val = *(const volatile uint64_t *)pt->ptr; -- 2.30.2