Commit 6d425d7c authored by Yang Guang's avatar Yang Guang Committed by Shuah Khan

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: default avatarZeal Robot <zealci@zte.com.cn>
Signed-off-by: default avatarYang Guang <yang.guang5@zte.com.cn>
Signed-off-by: default avatarShuah Khan <skhan@linuxfoundation.org>
parent 3abedf46
...@@ -204,7 +204,7 @@ bool test_unpriv_remount(const char *fstype, const char *mount_options, ...@@ -204,7 +204,7 @@ bool test_unpriv_remount(const char *fstype, const char *mount_options,
if (!WIFEXITED(status)) { if (!WIFEXITED(status)) {
die("child did not terminate cleanly\n"); die("child did not terminate cleanly\n");
} }
return WEXITSTATUS(status) == EXIT_SUCCESS ? true : false; return WEXITSTATUS(status) == EXIT_SUCCESS;
} }
create_and_enter_userns(); create_and_enter_userns();
...@@ -282,7 +282,7 @@ static bool test_priv_mount_unpriv_remount(void) ...@@ -282,7 +282,7 @@ static bool test_priv_mount_unpriv_remount(void)
if (!WIFEXITED(status)) { if (!WIFEXITED(status)) {
die("child did not terminate cleanly\n"); 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); orig_mnt_flags = read_mnt_flags(orig_path);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment