summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/mount/unprivileged-remount-test.c
diff options
context:
space:
mode:
authorYang Guang <yang.guang5@zte.com.cn>2021-11-25 03:56:03 +0300
committerShuah Khan <skhan@linuxfoundation.org>2021-12-11 02:46:01 +0300
commit6d425d7c1bec67eceee42fefe5ce00be0645482e (patch)
treed801233f63caf6a467824c75b030ea2b601a6a84 /tools/testing/selftests/mount/unprivileged-remount-test.c
parent3abedf4646fdc0036fcb8ebbc3b600667167fafe (diff)
downloadlinux-6d425d7c1bec67eceee42fefe5ce00be0645482e.tar.xz
selftests/mount: remove unneeded conversion to bool
The coccinelle report ./tools/testing/selftests/mount/unprivileged-remount-test.c:285:54-59: WARNING: conversion to bool not needed here ./tools/testing/selftests/mount/unprivileged-remount-test.c:207:54-59: WARNING: conversion to bool not needed here Relational and logical operators evaluate to bool, explicit conversion is overly verbose and unneeded. Reported-by: Zeal Robot <zealci@zte.com.cn> Signed-off-by: Yang Guang <yang.guang5@zte.com.cn> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Diffstat (limited to 'tools/testing/selftests/mount/unprivileged-remount-test.c')
-rw-r--r--tools/testing/selftests/mount/unprivileged-remount-test.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/testing/selftests/mount/unprivileged-remount-test.c b/tools/testing/selftests/mount/unprivileged-remount-test.c
index 584dc6bc3b06..d2917054fe3a 100644
--- a/tools/testing/selftests/mount/unprivileged-remount-test.c
+++ b/tools/testing/selftests/mount/unprivileged-remount-test.c
@@ -204,7 +204,7 @@ bool test_unpriv_remount(const char *fstype, const char *mount_options,
if (!WIFEXITED(status)) {
die("child did not terminate cleanly\n");
}
- return WEXITSTATUS(status) == EXIT_SUCCESS ? true : false;
+ return WEXITSTATUS(status) == EXIT_SUCCESS;
}
create_and_enter_userns();
@@ -282,7 +282,7 @@ static bool test_priv_mount_unpriv_remount(void)
if (!WIFEXITED(status)) {
die("child did not terminate cleanly\n");
}
- return WEXITSTATUS(status) == EXIT_SUCCESS ? true : false;
+ return WEXITSTATUS(status) == EXIT_SUCCESS;
}
orig_mnt_flags = read_mnt_flags(orig_path);