X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fserial.c;h=cf7ad2a1ed9961d4c5ae254bf02b3371a87561e2;hb=43954e07f30d05b2da8319749400c9bf4d01c23c;hp=0878d3c93b1dac2b4d4bc331e4d13e56a358ede9;hpb=ccc4feb9576f520596508418f404beb000fde1aa;p=collectd.git diff --git a/src/serial.c b/src/serial.c index 0878d3c9..cf7ad2a1 100644 --- a/src/serial.c +++ b/src/serial.c @@ -22,6 +22,7 @@ **/ #include "collectd.h" + #include "common.h" #include "plugin.h" @@ -73,7 +74,6 @@ static int serial_read (void) char *fields[16]; int numfields; - int i; numfields = strsplit (buffer, fields, STATIC_ARRAY_SIZE (fields)); if (numfields < 6) @@ -90,7 +90,7 @@ static int serial_read (void) continue; fields[0][len - 1] = 0; - for (i = 1; i < numfields; i++) + for (int i = 1; i < numfields; i++) { len = strlen (fields[i]); if (len < 4)