From: Dmitry V. Levin Date: Fri, 23 Dec 2016 23:30:33 +0000 (+0000) Subject: ptrace_restart: change types of integer arguments to unsigned X-Git-Tag: v4.16~253 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5691f4e23a4818191340c15d50ca06652fd76878;p=strace ptrace_restart: change types of integer arguments to unsigned * strace.c (ptrace_restart): Change types of "op" and "sig" from int to unsigned int. --- diff --git a/strace.c b/strace.c index 56fdfdee..ac9ff7f9 100644 --- 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; }