summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 5c19a9f)
raw | patch | inline | side by side (parent: 5c19a9f)
author | Corey Kosak <kosak@google.com> | |
Sat, 23 Jan 2016 00:10:21 +0000 (19:10 -0500) | ||
committer | Marc Fournier <marc.fournier@camptocamp.com> | |
Tue, 26 Jan 2016 06:02:12 +0000 (07:02 +0100) |
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.
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 | patch | blob | history |
diff --git a/src/processes.c b/src/processes.c
index f03056948fc0893380f428ffee56355d604a5d4a..8648614752a301e417f05ea40adf8e5cb1354e96 100644 (file)
--- a/src/processes.c
+++ b/src/processes.c
#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;
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);