Signed-off-by: Bryce Harrington <[email protected]>
---
 tests/test-runner.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/tests/test-runner.c b/tests/test-runner.c
index 9abf22f..b813b69 100644
--- a/tests/test-runner.c
+++ b/tests/test-runner.c
@@ -255,14 +255,15 @@ is_debugger_attached(void)
 {
        int status;
        int rc;
-       int pid = fork();
+       pid_t pid = fork();
 
        if (pid == -1)
                return 0;
 
        if (pid == 0) {
-               int ppid = getppid();
-               if (ptrace(PTRACE_ATTACH, ppid, NULL, NULL) == 0) {
+               pid_t ppid = getppid();
+               rc = ptrace(PTRACE_ATTACH, ppid, NULL, NULL);
+               if (rc == 0) {
                        waitpid(ppid, NULL, 0);
                        ptrace(PTRACE_CONT, NULL, NULL);
                        ptrace(PTRACE_DETACH, ppid, NULL, NULL);
-- 
1.9.1

_______________________________________________
wayland-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/wayland-devel

Reply via email to