Skip to content

Commit

Permalink
ptrace_linux: Get rid of (__ptrace_request) casts
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonKagstrom committed Jul 8, 2024
1 parent dbb6be8 commit c247c35
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/engines/ptrace_linux.cc
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ static long getRegs(pid_t pid, void *addr, void *regs, size_t len)
return ptrace(PTRACE_GETREGSET, pid, (void *)NT_PRSTATUS, &iov);
#else
(void) len;
return ptrace((__ptrace_request ) PTRACE_GETREGS, pid, NULL, regs);
return ptrace(PTRACE_GETREGS, pid, NULL, regs);
#endif
}

Expand Down Expand Up @@ -361,12 +361,12 @@ static int kill_lwp(unsigned long lwpid, int signo)
unsigned long ptrace_sys::peekWord(pid_t pid, unsigned long aligned_addr)
{

return ptrace((__ptrace_request ) PTRACE_PEEKTEXT, pid, aligned_addr, 0);
return ptrace(PTRACE_PEEKTEXT, pid, aligned_addr, 0);
}

void ptrace_sys::pokeWord(pid_t pid, unsigned long aligned_addr, unsigned long value)
{
ptrace((__ptrace_request ) PTRACE_POKETEXT, pid, aligned_addr, value);
ptrace(PTRACE_POKETEXT, pid, aligned_addr, value);
}

static long setRegs(pid_t pid, void *addr, void *regs, size_t len)
Expand All @@ -377,7 +377,7 @@ static long setRegs(pid_t pid, void *addr, void *regs, size_t len)
return ptrace(PTRACE_SETREGSET, pid, (void *)NT_PRSTATUS, &iov);
#else
(void) len;
return ptrace((__ptrace_request ) PTRACE_SETREGS, pid, NULL, regs);
return ptrace(PTRACE_SETREGS, pid, NULL, regs);
#endif
}

Expand Down

0 comments on commit c247c35

Please sign in to comment.