summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: af9b05b)
raw | patch | inline | side by side (parent: af9b05b)
author | Florian Forster <octo@leeloo.lan.home.verplant.org> | |
Fri, 2 Oct 2009 09:37:05 +0000 (11:37 +0200) | ||
committer | Florian Forster <octo@leeloo.lan.home.verplant.org> | |
Fri, 2 Oct 2009 09:37:05 +0000 (11:37 +0200) |
Because we pick the required line further down, having lines with more
fields is not illegal anymore.
Thanks to Patrik Weiskircher for noticing :)
fields is not illegal anymore.
Thanks to Patrik Weiskircher for noticing :)
src/contextswitch.c | patch | blob | history | |
src/processes.c | patch | blob | history |
diff --git a/src/contextswitch.c b/src/contextswitch.c
index b53b5740bd6358ff21a739b59a71a283da0c4980..7787203dde178ad2b5859fd603bf7085b90ba663 100644 (file)
--- a/src/contextswitch.c
+++ b/src/contextswitch.c
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;
diff --git a/src/processes.c b/src/processes.c
index 8b937968e2d834f5cbacfab049e9c35b428ef83e..5f67abaa12dd879072ccc4e794e575fc241146a9 100644 (file)
--- a/src/processes.c
+++ b/src/processes.c
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;