projects
/
collectd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
964b45d
)
processes: Fix ps_get_cmdline() on Solaris.
author
Jan Andres
<jandres@gmx.net>
Wed, 28 Jan 2015 19:00:41 +0000
(20:00 +0100)
committer
Jan Andres
<jandres@gmx.net>
Sat, 31 Jan 2015 08:40:00 +0000
(09:40 +0100)
Return value of read_file_contents() was checked incorrectly.
src/processes.c
patch
|
blob
|
history
diff --git
a/src/processes.c
b/src/processes.c
index
68f30a5
..
fb88a31
100644
(file)
--- 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\": "