Because we pick the required line further down, having lines with more
fields is not illegal anymore.
Thanks to Patrik Weiskircher for noticing :)
char *endptr;
numfields = strsplit(buffer, fields, STATIC_ARRAY_SIZE (fields));
- if (numfields != 2) {
- ERROR ("contextswitch plugin: ctxt in /proc/stat "
- "contains more than 2 fields.");
+ if (numfields != 2)
continue;
- }
if (strcmp("ctxt", fields[0]) != 0)
continue;
char *endptr;
numfields = strsplit(buf, fields, STATIC_ARRAY_SIZE (fields));
- if (numfields != 2) {
- ERROR ("processes plugin: processes in /proc/stat "
- "contains more than 2 fields.");
+ if (numfields != 2)
continue;
- }
+
if (strcmp ("processes", fields[0]) != 0)
continue;