X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Ffscache.c;h=33633d63247db02deb1c7a909d228557b90184c2;hb=db961f476426f5dd3ca1663ffc094f0fc7f6f8a2;hp=68f5c79c98006c37585770b0674bd3b32611b9c7;hpb=23faf977688c7123d624b2911e69e2c9f4d0f78c;p=collectd.git diff --git a/src/fscache.c b/src/fscache.c index 68f5c79c..33633d63 100644 --- a/src/fscache.c +++ b/src/fscache.c @@ -20,6 +20,7 @@ **/ #include "collectd.h" + #include "common.h" #include "plugin.h" #include /* a header needed for FILE */ @@ -158,7 +159,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, ':'); @@ -182,7 +182,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;