Skip to content

Commit 397b3a0

Browse files
ytcoodeNobody
authored and
Nobody
committed
selftests/bpf: Remove redundant checks in get_stack_print_output()
The checks preceding CHECK macro are redundant, remove them. Signed-off-by: Yuntao Wang <[email protected]>
1 parent be5ef2f commit 397b3a0

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

tools/testing/selftests/bpf/prog_tests/get_stack_raw_tp.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,10 +76,8 @@ static void get_stack_print_output(void *ctx, int cpu, void *data, __u32 size)
7676
good_user_stack = true;
7777
}
7878

79-
if (!good_kern_stack)
80-
CHECK(!good_kern_stack, "kern_stack", "corrupted kernel stack\n");
81-
if (!good_user_stack)
82-
CHECK(!good_user_stack, "user_stack", "corrupted user stack\n");
79+
CHECK(!good_kern_stack, "kern_stack", "corrupted kernel stack\n");
80+
CHECK(!good_user_stack, "user_stack", "corrupted user stack\n");
8381
}
8482

8583
void test_get_stack_raw_tp(void)

0 commit comments

Comments
 (0)