summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 6812363)
raw | patch | inline | side by side (parent: 6812363)
author | Florian Forster <octo@collectd.org> | |
Thu, 9 Nov 2017 15:12:10 +0000 (16:12 +0100) | ||
committer | Florian Forster <octo@collectd.org> | |
Thu, 9 Nov 2017 15:12:10 +0000 (16:12 +0100) |
;-)
src/varnish.c | patch | blob | history |
diff --git a/src/varnish.c b/src/varnish.c
index ebc8e7aa00fe5051729164f26ebbd4048db921d4..d105b025a62922f332a754403411f3d5e449956d 100644 (file)
--- a/src/varnish.c
+++ b/src/varnish.c
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;