summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 0ae43c4)
raw | patch | inline | side by side (parent: 0ae43c4)
author | Jan Andres <jandres@gmx.net> | |
Wed, 28 Jan 2015 19:00:41 +0000 (20:00 +0100) | ||
committer | Marc Fournier <marc.fournier@camptocamp.com> | |
Tue, 19 May 2015 15:42:43 +0000 (17:42 +0200) |
Return value of read_file_contents() was checked incorrectly.
src/processes.c | patch | blob | history |
diff --git a/src/processes.c b/src/processes.c
index d6b48452ef44416078308ed2402e373b8c21a411..8dd43e89410823c11e329e3de6e61339de8ef16a 100644 (file)
--- a/src/processes.c
+++ b/src/processes.c
snprintf(path, sizeof (path), "/proc/%i/psinfo", pid);
status = read_file_contents (path, (void *) &info, sizeof (info));
- if (status != ((int) buffer_size))
+ if (status != sizeof (info))
{
ERROR ("processes plugin: Unexpected return value "
"while reading \"%s\": "