]> git.ipfire.org Git - thirdparty/collectd.git/commitdiff
./contrib/format.sh src/utils/common/*.[ch]
authorFlorian Forster <octo@collectd.org>
Mon, 18 Dec 2023 23:15:45 +0000 (00:15 +0100)
committerFlorian Forster <octo@collectd.org>
Mon, 18 Dec 2023 23:15:45 +0000 (00:15 +0100)
src/utils/common/common.h
src/utils/common/common_test.c

index dd8007aef3fb721a9bfdfb64e3bf87b6c8c32cd6..1f21949067499d2ba73984dd92020d64a683b9fd 100644 (file)
@@ -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);
index 76ff77d516673e5d2c3ede078809ab23df43bac1..fabbf2fb87795b752088f8c5492937f549ce11f8 100644 (file)
@@ -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;