From db073ce58794b9c8ff65fd57fb59930591682d68 Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Tue, 19 Dec 2023 00:15:45 +0100 Subject: [PATCH] ./contrib/format.sh src/utils/common/*.[ch] --- src/utils/common/common.h | 1 - src/utils/common/common_test.c | 14 ++++++-------- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/src/utils/common/common.h b/src/utils/common/common.h index dd8007aef..1f2194906 100644 --- a/src/utils/common/common.h +++ b/src/utils/common/common.h @@ -179,7 +179,6 @@ int strsplit(char *string, char **fields, size_t size); int strjoin(char *dst, size_t dst_len, char **fields, size_t fields_num, const char *sep); - /* string_has_suffix returns true if s ends with suffix. If either s or suffix * are NULL, false is returned. */ bool string_has_suffix(char const *s, char const *suffix); diff --git a/src/utils/common/common_test.c b/src/utils/common/common_test.c index 76ff77d51..fabbf2fb8 100644 --- a/src/utils/common/common_test.c +++ b/src/utils/common/common_test.c @@ -367,16 +367,14 @@ DEF_TEST(string_has_suffix) { char const *suffix; bool want; } cases[] = { - {"foo.bar", "bar", true}, - {"foo.qux", "bar", false}, - {"foo.Bar", "bar", false}, - {"foo", "foo", true}, - {"foo", "foo.bar", false}, - {"foo", NULL, false}, - {NULL, "foo", false}, + {"foo.bar", "bar", true}, {"foo.qux", "bar", false}, + {"foo.Bar", "bar", false}, {"foo", "foo", true}, + {"foo", "foo.bar", false}, {"foo", NULL, false}, + {NULL, "foo", false}, }; for (size_t i = 0; i < STATIC_ARRAY_SIZE(cases); i++) { - EXPECT_EQ_INT(cases[i].want, string_has_suffix(cases[i].s, cases[i].suffix)); + EXPECT_EQ_INT(cases[i].want, + string_has_suffix(cases[i].s, cases[i].suffix)); } return 0; -- 2.47.2