diff options
author | Mike Frysinger <vapier@gentoo.org> | 2021-10-20 21:43:36 -0400 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2021-10-20 21:43:36 -0400 |
commit | 861541d1080fca9400c264c221bc5ec6b48de1b0 (patch) | |
tree | 22eae82167c1f85d11cc3af3688c9642525a3691 | |
parent | libsandbox: fix incorrect indentation (diff) | |
download | sandbox-861541d1080fca9400c264c221bc5ec6b48de1b0.tar.gz sandbox-861541d1080fca9400c264c221bc5ec6b48de1b0.tar.bz2 sandbox-861541d1080fca9400c264c221bc5ec6b48de1b0.zip |
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@gentoo.org>
-rw-r--r-- | libsandbox/trace.c | 3 |
1 files changed, 1 insertions, 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)) { |