Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Yang Guang and committed by
Shuah Khan
6d425d7c 3abedf46

+2 -2
+2 -2
tools/testing/selftests/mount/unprivileged-remount-test.c
··· 204 204 if (!WIFEXITED(status)) { 205 205 die("child did not terminate cleanly\n"); 206 206 } 207 - return WEXITSTATUS(status) == EXIT_SUCCESS ? true : false; 207 + return WEXITSTATUS(status) == EXIT_SUCCESS; 208 208 } 209 209 210 210 create_and_enter_userns(); ··· 282 282 if (!WIFEXITED(status)) { 283 283 die("child did not terminate cleanly\n"); 284 284 } 285 - return WEXITSTATUS(status) == EXIT_SUCCESS ? true : false; 285 + return WEXITSTATUS(status) == EXIT_SUCCESS; 286 286 } 287 287 288 288 orig_mnt_flags = read_mnt_flags(orig_path);