From 4e7e515ba12198efe3df4d16451488de551fd529 Mon Sep 17 00:00:00 2001 From: Jan Andres Date: Wed, 28 Jan 2015 20:00:41 +0100 Subject: [PATCH] processes: Fix ps_get_cmdline() on Solaris. Return value of read_file_contents() was checked incorrectly. --- src/processes.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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\": " -- 2.11.0