From: Jan Andres Date: Wed, 28 Jan 2015 19:00:41 +0000 (+0100) Subject: processes: Fix ps_get_cmdline() on Solaris. X-Git-Tag: collectd-5.5.0~25^2~3 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=1063a898bc1a05a954e7290296365d7ef26eb8a5;p=collectd.git processes: Fix ps_get_cmdline() on Solaris. Return value of read_file_contents() was checked incorrectly. --- diff --git a/src/processes.c b/src/processes.c index 68f30a5a..fb88a315 100644 --- a/src/processes.c +++ b/src/processes.c @@ -1209,7 +1209,7 @@ static const char *ps_get_cmdline (pid_t pid, /* {{{ */ 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\": "