Re: [PATCH linux-next] tools:mount: Remove unnecessary conversion to bool

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 8/19/21 9:32 PM, CGEL wrote:
From: jing yangyang <jing.yangyang@xxxxxxxxxx>

Suppress following warning from coccinelle:

./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

Reported-by: Zeal Robot <zealci@xxxxxxxxxx>
Signed-off-by: jing yangyang <jing.yangyang@xxxxxxxxxx>
---
  tools/testing/selftests/mount/unprivileged-remount-test.c | 6 +++---
  1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/tools/testing/selftests/mount/unprivileged-remount-test.c b/tools/testing/selftests/mount/unprivileged-remount-test.c
index 584dc6b..bc802f6 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);


We can't accept this patch. The from and Signed-off-by don't match.

thanks,
-- Shuah



[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux