Skip to contentSkip to conversation

mnt: Delete two unneeded bool conversions

PATCH New Zhen Lei 1 participant 1 message May 10, 2021 Kselftest

lore
Share & tools
lore

Zhen Lei

author
#0 lore raw

PATCH 1/1 mnt: Delete two unneeded bool conversions

The result of an expression consisting of a single relational operator is already of the bool type and does not need to be evaluated explicitly.

No functional change.

---
 tools/testing/selftests/mount/unprivileged-remount-test.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
tools/testing/selftests/mount/unprivileged-remount-test.c +2 -2
index 584dc6bc3b06679..d2917054fe3ae56 100644
@@ -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);
Signature · 1 line
2.26.0.106.g9fadedd