Merge branch 'collectd-5.6'
[collectd.git] / src / fscache.c
index 332a32c..3a5baf5 100644 (file)
@@ -115,7 +115,6 @@ static void fscache_submit (const char *section, const char *name,
     vl.values = &value;
     vl.values_len = 1;
 
-    sstrncpy(vl.host, hostname_g, sizeof (vl.host));
     sstrncpy(vl.plugin, "fscache", sizeof (vl.plugin));
     sstrncpy(vl.plugin_instance, section, sizeof (vl.plugin_instance));
     sstrncpy(vl.type, "fscache_stat", sizeof(vl.type));
@@ -159,7 +158,6 @@ static void fscache_read_stats_file (FILE *fh)
         char *lineptr;
         char *fields[32];
         int fields_num;
-        int i;
 
         /* Find the colon and replace it with a null byte */
         lineptr = strchr (linebuffer, ':');
@@ -183,7 +181,7 @@ static void fscache_read_stats_file (FILE *fh)
         if (fields_num <= 0)
             continue;
 
-        for (i = 0; i < fields_num; i++)
+        for (int i = 0; i < fields_num; i++)
         {
             char *field_name;
             char *field_value_str;