ptrace_restart: cleanup
* strace.c (ptrace_restart): Replace the sequence of "if" statements with a "switch" statement.
This commit is contained in:
parent
5691f4e23a
commit
0868093228
21
strace.c
21
strace.c
@ -397,13 +397,20 @@ ptrace_restart(const unsigned int op, struct tcb *const tcp, unsigned int sig)
|
||||
if (!err)
|
||||
return 0;
|
||||
|
||||
msg = "SYSCALL";
|
||||
if (op == PTRACE_CONT)
|
||||
msg = "CONT";
|
||||
if (op == PTRACE_DETACH)
|
||||
msg = "DETACH";
|
||||
if (op == PTRACE_LISTEN)
|
||||
msg = "LISTEN";
|
||||
switch (op) {
|
||||
case PTRACE_CONT:
|
||||
msg = "CONT";
|
||||
break;
|
||||
case PTRACE_DETACH:
|
||||
msg = "DETACH";
|
||||
break;
|
||||
case PTRACE_LISTEN:
|
||||
msg = "LISTEN";
|
||||
break;
|
||||
default:
|
||||
msg = "SYSCALL";
|
||||
}
|
||||
|
||||
/*
|
||||
* Why curcol != 0? Otherwise sometimes we get this:
|
||||
*
|
||||
|
Loading…
x
Reference in New Issue
Block a user