commit: 861541d1080fca9400c264c221bc5ec6b48de1b0 Author: Mike Frysinger <vapier <AT> gentoo <DOT> org> AuthorDate: Thu Oct 21 01:43:36 2021 +0000 Commit: Mike Frysinger <vapier <AT> gentoo <DOT> org> CommitDate: Thu Oct 21 01:43:36 2021 +0000 URL: https://gitweb.gentoo.org/proj/sandbox.git/commit/?id=861541d1
libsandbox: drop redundant regs ptrace lookup We don't need to lookup the register set twice, so drop the 2nd call. These parts of the code were merged during a refactor and while they made sense when they were in separate places, they don't here. Signed-off-by: Mike Frysinger <vapier <AT> gentoo.org> libsandbox/trace.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libsandbox/trace.c b/libsandbox/trace.c index 3efef23..fc700e3 100644 --- a/libsandbox/trace.c +++ b/libsandbox/trace.c @@ -467,9 +467,8 @@ static void trace_loop(void) ret = trace_get_regs(®s); nr = trace_get_sysnum(®s); - se = lookup_syscall_in_tbl(tbl_after_fork, nr); - ret = trace_get_regs(®s); + if (before_syscall) { _sb_debug("%s:%i", se ? se->name : "IDK", nr); if (!trace_check_syscall(se, ®s)) {