Skip to content

Commit

Permalink
syscalls: remove redundant conditional in sigaction() dispatch
Browse files Browse the repository at this point in the history
  • Loading branch information
jewelcodes committed Nov 27, 2024
1 parent 070ffb7 commit aaa6fd6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/syscalls/dispatch.c
Original file line number Diff line number Diff line change
Expand Up @@ -485,8 +485,8 @@ void syscallDispatchKill(SyscallRequest *req) {
}

void syscallDispatchSigAction(SyscallRequest *req) {
if((!req->params[1] || (req->params[1] && syscallVerifyPointer(req, req->params[1], sizeof(struct sigaction)))) &&
(!req->params[2] || (req->params[2] && syscallVerifyPointer(req, req->params[2], sizeof(struct sigaction))))) {
if((!req->params[1] || syscallVerifyPointer(req, req->params[1], sizeof(struct sigaction))) &&
(!req->params[2] || syscallVerifyPointer(req, req->params[2], sizeof(struct sigaction)))) {
req->ret = sigaction(req->thread, req->params[0], (const struct sigaction *) req->params[1], (struct sigaction *) req->params[2]);
req->unblock = true;
}
Expand Down

0 comments on commit aaa6fd6

Please sign in to comment.