aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2021-10-20 21:43:36 -0400
committerMike Frysinger <vapier@gentoo.org>2021-10-20 21:43:36 -0400
commit861541d1080fca9400c264c221bc5ec6b48de1b0 (patch)
tree22eae82167c1f85d11cc3af3688c9642525a3691 /libsandbox
parentlibsandbox: fix incorrect indentation (diff)
downloadsandbox-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>
Diffstat (limited to 'libsandbox')
-rw-r--r--libsandbox/trace.c3
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(&regs);
nr = trace_get_sysnum(&regs);
-
se = lookup_syscall_in_tbl(tbl_after_fork, nr);
- ret = trace_get_regs(&regs);
+
if (before_syscall) {
_sb_debug("%s:%i", se ? se->name : "IDK", nr);
if (!trace_check_syscall(se, &regs)) {