From aaa6fd68de48629e9d495bbac6f0e7c50181e3d7 Mon Sep 17 00:00:00 2001 From: jewelcodes Date: Tue, 26 Nov 2024 19:23:13 -0500 Subject: [PATCH] syscalls: remove redundant conditional in sigaction() dispatch --- src/syscalls/dispatch.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/syscalls/dispatch.c b/src/syscalls/dispatch.c index e807ccc..cfe1bf8 100644 --- a/src/syscalls/dispatch.c +++ b/src/syscalls/dispatch.c @@ -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; }