From bb978c10e7b6cde5be79ade8b14fcdbb78f7b8ea Mon Sep 17 00:00:00 2001 From: Corey Kosak Date: Fri, 22 Jan 2016 19:10:21 -0500 Subject: [PATCH] Provide a unified signature for ps_get_cmdline. Prior to this change, ps_get_cmdline had different signatures for KERNEL_LINUX vs. KERNEL_SOLARIS. This means that callers who want to call this function would have to have an #if..#else that controlled which variant of the function to call. By giving them the same signature, callers don't have to worry about that. --- src/processes.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/processes.c b/src/processes.c index f0305694..86486147 100644 --- a/src/processes.c +++ b/src/processes.c @@ -1213,8 +1213,8 @@ static int read_fork_rate () #endif /*KERNEL_LINUX */ #if KERNEL_SOLARIS -static const char *ps_get_cmdline (long pid, /* {{{ */ - char *buffer, size_t buffer_size) +static char *ps_get_cmdline (pid_t pid, char *name __attribute__((unused)), /* {{{ */ + char *buffer, size_t buffer_size) { char path[PATH_MAX]; psinfo_t info; @@ -2165,7 +2165,7 @@ static int ps_read (void) ps_list_add (ps.name, - ps_get_cmdline (pid, cmdline, sizeof (cmdline)), + ps_get_cmdline (pid, ps.name, cmdline, sizeof (cmdline)), &pse); } /* while(readdir) */ closedir (proc); -- 2.11.0