Skip to content

Commit 6d425d7

Browse files
Yang Guangshuahkh
authored andcommitted
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 <[email protected]> Signed-off-by: Yang Guang <[email protected]> Signed-off-by: Shuah Khan <[email protected]>
1 parent 3abedf4 commit 6d425d7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tools/testing/selftests/mount/unprivileged-remount-test.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ bool test_unpriv_remount(const char *fstype, const char *mount_options,
204204
if (!WIFEXITED(status)) {
205205
die("child did not terminate cleanly\n");
206206
}
207-
return WEXITSTATUS(status) == EXIT_SUCCESS ? true : false;
207+
return WEXITSTATUS(status) == EXIT_SUCCESS;
208208
}
209209

210210
create_and_enter_userns();
@@ -282,7 +282,7 @@ static bool test_priv_mount_unpriv_remount(void)
282282
if (!WIFEXITED(status)) {
283283
die("child did not terminate cleanly\n");
284284
}
285-
return WEXITSTATUS(status) == EXIT_SUCCESS ? true : false;
285+
return WEXITSTATUS(status) == EXIT_SUCCESS;
286286
}
287287

288288
orig_mnt_flags = read_mnt_flags(orig_path);

0 commit comments

Comments
 (0)