From e65857d3e8a2f0ae58982834f1298cf545d22fae Mon Sep 17 00:00:00 2001 From: V Date: Tue, 8 Feb 2022 04:34:44 +0000 Subject: ripple/minitrace: clean up prlimit64 arg destructuring Change-Id: If54ca6c931c0f3c8d99a65aeca15385f1ef8ebf3 --- ripple/minitrace/src/main.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'ripple/minitrace/src') diff --git a/ripple/minitrace/src/main.rs b/ripple/minitrace/src/main.rs index ae1de7c..ca0ce65 100644 --- a/ripple/minitrace/src/main.rs +++ b/ripple/minitrace/src/main.rs @@ -312,12 +312,13 @@ fn check_syscall(process: &Process, entry: SyscallEntry) -> bool { // prlimit64 302 => { - // pid = 0 - if entry.args[0] != 0 { + let [pid, resource, _new_limit, _old_limit, ..] = entry.args; + + if pid != 0 { return false; } - match entry.args[1] as u32 { + match resource as u32 { libc::RLIMIT_AS | libc::RLIMIT_STACK | libc::RLIMIT_RSS => {} _ => return false, } -- cgit 1.4.1