]> granicus.if.org Git - strace/commitdiff
ptrace_restart: change types of integer arguments to unsigned
authorDmitry V. Levin <ldv@altlinux.org>
Fri, 23 Dec 2016 23:30:33 +0000 (23:30 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Sat, 24 Dec 2016 14:58:29 +0000 (14:58 +0000)
* strace.c (ptrace_restart): Change types of "op" and "sig"
from int to unsigned int.

strace.c

index 56fdfdee29aae98b2ce69bebc7903692b7334408..ac9ff7f9d734b2f8caf187f7e0df0c06d6d53925 100644 (file)
--- a/strace.c
+++ b/strace.c
@@ -386,13 +386,13 @@ ptrace_attach_or_seize(int pid)
  * Otherwise prints error message and returns -1.
  */
 static int
-ptrace_restart(int op, struct tcb *tcp, int sig)
+ptrace_restart(const unsigned int op, struct tcb *const tcp, unsigned int sig)
 {
        int err;
        const char *msg;
 
        errno = 0;
-       ptrace(op, tcp->pid, (void *) 0, (long) sig);
+       ptrace(op, tcp->pid, 0L, (unsigned long) sig);
        err = errno;
        if (!err)
                return 0;
@@ -420,7 +420,7 @@ ptrace_restart(int op, struct tcb *tcp, int sig)
        if (err == ESRCH)
                return 0;
        errno = err;
-       perror_msg("ptrace(PTRACE_%s,pid:%d,sig:%d)", msg, tcp->pid, sig);
+       perror_msg("ptrace(PTRACE_%s,pid:%d,sig:%u)", msg, tcp->pid, sig);
        return -1;
 }