projects
/
collectd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
varnish plugin: Avoid unused variable even harder.
[collectd.git]
/
src
/
varnish.c
diff --git
a/src/varnish.c
b/src/varnish.c
index
69daa98
..
d105b02
100644
(file)
--- a/
src/varnish.c
+++ b/
src/varnish.c
@@
-144,7
+144,6
@@
static int varnish_monitor(void *priv,
{
uint64_t val;
const user_config_t *conf;
{
uint64_t val;
const user_config_t *conf;
- const char *class;
const char *name;
if (pt == NULL)
const char *name;
if (pt == NULL)
@@
-160,21
+159,16
@@
static int varnish_monitor(void *priv,
strcpy(namebuff, c + 1);
name = namebuff;
strcpy(namebuff, c + 1);
name = namebuff;
- (void)class;
-
#elif HAVE_VARNISH_V4
#elif HAVE_VARNISH_V4
- class = pt->section->fantom->type;
- name = pt->desc->name;
-
- if (strcmp(class, "MAIN") != 0)
+ if (strcmp(pt->section->fantom->type, "MAIN") != 0)
return 0;
return 0;
+ name = pt->desc->name;
#elif HAVE_VARNISH_V3
#elif HAVE_VARNISH_V3
- class = pt->class;
- name = pt->name;
-
- if (strcmp(class, "") != 0)
+ if (strcmp(pt->class, "") != 0)
return 0;
return 0;
+
+ name = pt->name;
#endif
val = *(const volatile uint64_t *)pt->ptr;
#endif
val = *(const volatile uint64_t *)pt->ptr;