X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fnginx.c;h=3850accf05c663cce1a7f799781c4142b9b7bd80;hb=1aa4295ba6875ceb02a7383237bc2485ffab9c1e;hp=2c7e1ccdf8e8398de4ffb8009e0629b51870d08b;hpb=a5377cf935630082f2eac2e5f4a538844cc06c8d;p=collectd.git diff --git a/src/nginx.c b/src/nginx.c index 2c7e1ccd..3850accf 100644 --- a/src/nginx.c +++ b/src/nginx.c @@ -30,7 +30,6 @@ #include "common.h" #include "plugin.h" -#include "configfile.h" #include @@ -211,7 +210,7 @@ static void submit (const char *type, const char *inst, long long value) return; vl.values = values; - vl.values_len = 1; + vl.values_len = STATIC_ARRAY_SIZE (values); sstrncpy (vl.host, hostname_g, sizeof (vl.host)); sstrncpy (vl.plugin, "nginx", sizeof (vl.plugin)); sstrncpy (vl.plugin_instance, "", sizeof (vl.plugin_instance)); @@ -225,8 +224,6 @@ static void submit (const char *type, const char *inst, long long value) static int nginx_read (void) { - int i; - char *ptr; char *lines[16]; int lines_num = 0; @@ -264,7 +261,7 @@ static int nginx_read (void) * 16630948 16630948 31070465 * Reading: 6 Writing: 179 Waiting: 106 */ - for (i = 0; i < lines_num; i++) + for (int i = 0; i < lines_num; i++) { fields_num = strsplit (lines[i], fields, (sizeof (fields) / sizeof (fields[0])));