[LTP] [PATCH 4/8] tst_test.c: Change results_equal() return type to bool
Petr Vorel
pvorel@suse.cz
Fri Nov 7 11:29:35 CET 2025
Also add doc (don't use kerneldoc as this is a internal function which
does not need to be in LTP online doc).
Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
lib/tst_test.c | 17 +++++++++++------
1 file changed, 11 insertions(+), 6 deletions(-)
diff --git a/lib/tst_test.c b/lib/tst_test.c
index 1725844b54..449ddb6ba5 100644
--- a/lib/tst_test.c
+++ b/lib/tst_test.c
@@ -1086,21 +1086,26 @@ static bool check_kver(const char *min_kver, const int brk_nosupp)
return true;
}
-static int results_equal(struct results *a, struct results *b)
+/*
+ * Checks if the struct results values are equal.
+ *
+ * return: true if results are equal, false otherwise.
+ */
+static bool results_equal(struct results *a, struct results *b)
{
if (a->passed != b->passed)
- return 0;
+ return false;
if (a->failed != b->failed)
- return 0;
+ return false;
if (a->skipped != b->skipped)
- return 0;
+ return false;
if (a->broken != b->broken)
- return 0;
+ return false;
- return 1;
+ return true;
}
static int needs_tmpdir(void)
--
2.51.0
More information about the ltp
mailing list