From 1063a898bc1a05a954e7290296365d7ef26eb8a5 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 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\": " -- 2.30.2