]> granicus.if.org Git - strace/commitdiff
tests/ptrace.c: fix fork() return value check
authorElvira Khabirova <lineprinter0@gmail.com>
Sun, 5 Jun 2016 23:39:59 +0000 (02:39 +0300)
committerDmitry V. Levin <ldv@altlinux.org>
Mon, 6 Jun 2016 18:07:04 +0000 (18:07 +0000)
* tests/ptrace.c (test_peeksiginfo): Explicitly cast fork() return value
to pid_t.

tests/ptrace.c

index 2fbefdd45bd6696c3d8528822bfe95dba185ea9d..7971b8941b1f02e9cd38ee86fcc8858afdce5d43 100644 (file)
@@ -72,7 +72,7 @@ test_peeksiginfo(unsigned long pid, const unsigned long bad_request)
               (unsigned) pid, psi->off, psi->nr, bad_request, rc, errno2name());
 
        pid = fork();
-       if (pid < 0)
+       if ((pid_t) pid < 0)
                perror_msg_and_fail("fork");
 
        if (!pid) {