[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <f1fe5f6b00e62a6f70c47f1d8b4c41d5d7d03d7d.1637736469.git.yang.guang5@zte.com.cn>
Date: Thu, 25 Nov 2021 08:58:07 +0800
From: davidcomponentone@...il.com
To: shuah@...nel.org
Cc: davidcomponentone@...il.com, christian.brauner@...ntu.com,
ptikhomirov@...tuozzo.com, linux-kselftest@...r.kernel.org,
linux-kernel@...r.kernel.org, Yang Guang <yang.guang5@....com.cn>,
Zeal Robot <zealci@....com.cn>
Subject: [PATCH] tests: remove unneeded conversion to bool
From: Yang Guang <yang.guang5@....com.cn>
The coccinelle report
./tools/testing/selftests/move_mount_set_group/move_mount_set_group_test.c:225:18-23:
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@....com.cn>
Signed-off-by: Yang Guang <yang.guang5@....com.cn>
---
.../selftests/move_mount_set_group/move_mount_set_group_test.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/move_mount_set_group/move_mount_set_group_test.c b/tools/testing/selftests/move_mount_set_group/move_mount_set_group_test.c
index 860198f83a53..80ff0b692486 100644
--- a/tools/testing/selftests/move_mount_set_group/move_mount_set_group_test.c
+++ b/tools/testing/selftests/move_mount_set_group/move_mount_set_group_test.c
@@ -222,7 +222,7 @@ static int move_mount_set_group_supported(void)
AT_FDCWD, SET_GROUP_TO, MOVE_MOUNT_SET_GROUP);
umount2("/tmp", MNT_DETACH);
- return ret < 0 ? false : true;
+ return ret >= 0;
}
FIXTURE(move_mount_set_group) {
--
2.30.2
Powered by blists - more mailing lists