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~12^2~4^2~4 X-Git-Url: https://git.octo.it/?p=collectd.git;a=commitdiff_plain;h=4e7e515ba12198efe3df4d16451488de551fd529;hp=0ae43c418801b406f08de47fb467223cf5781669 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 d6b48452..8dd43e89 100644 --- a/src/processes.c +++ b/src/processes.c @@ -1205,7 +1205,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\": "