diff options
author | Petr Machata <pmachata@redhat.com> | 2013-03-19 18:00:58 +0100 |
---|---|---|
committer | Petr Machata <pmachata@redhat.com> | 2013-03-19 18:09:04 +0100 |
commit | 8be68ff436d32e803907e6dda3dc994c495d2f1e (patch) | |
tree | 06a855ca17c7865f45cf45b18f5a9f844a767384 /proc.c | |
parent | f70812ec281a829ca7a758337aacec58eca41550 (diff) | |
download | ltrace-8be68ff436d32e803907e6dda3dc994c495d2f1e.tar.gz |
open_one_pid doesn't return boolean, but <0 on error
- This compiles down to the exact same code, but we want to be clear
about the calling convention.
Diffstat (limited to 'proc.c')
-rw-r--r-- | proc.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -518,7 +518,7 @@ open_pid(pid_t pid) return; /* First, see if we can attach the requested PID itself. */ - if (open_one_pid(pid)) { + if (open_one_pid(pid) < 0) { fprintf(stderr, "Cannot attach to pid %u: %s\n", pid, strerror(errno)); trace_fail_warning(pid); @@ -550,7 +550,7 @@ open_pid(pid_t pid) have_all = 1; for (i = 0; i < ntasks; ++i) if (pid2proc(tasks[i]) == NULL - && open_one_pid(tasks[i])) + && open_one_pid(tasks[i]) < 0) have_all = 0; free(tasks); |