Skip to content

Commit

Permalink
selftests/bpf: Fix unnecessary conversion to bool in 'run_subtest'
Browse files Browse the repository at this point in the history
Fixes the following coccicheck:

tools/testing/selftests/bpf/test_loader.c:1033:64-69: WARNING: conversion to bool not needed here

Fixes: 80a4129 ("selftests/bpf: Add unit tests for bpf_arena_alloc/free_pages")
Signed-off-by: guanjing <[email protected]>
  • Loading branch information
guanjing authored and Kernel Patches Daemon committed Nov 20, 2024
1 parent 09004f4 commit e2853e7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/testing/selftests/bpf/test_loader.c
Original file line number Diff line number Diff line change
Expand Up @@ -1030,7 +1030,7 @@ void run_subtest(struct test_loader *tester,
}

do_prog_test_run(bpf_program__fd(tprog), &retval,
bpf_program__type(tprog) == BPF_PROG_TYPE_SYSCALL ? true : false);
bpf_program__type(tprog) == BPF_PROG_TYPE_SYSCALL);
if (retval != subspec->retval && subspec->retval != POINTER_VALUE) {
PRINT_FAIL("Unexpected retval: %d != %d\n", retval, subspec->retval);
goto tobj_cleanup;
Expand Down

0 comments on commit e2853e7

Please sign in to comment.