X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fdaemon%2Futils_subst_test.c;h=c6caba20f29293883c81a4eaa3895ff38247f6dd;hb=c76419c0cf983f1ecd3d36aa236cc4e3f9cff733;hp=953ccc4c3b18505073eb134f31d77e0bf9614197;hpb=6600bd1351bf81e0831e7ad95ee37a7b28cbdf94;p=collectd.git diff --git a/src/daemon/utils_subst_test.c b/src/daemon/utils_subst_test.c index 953ccc4c..c6caba20 100644 --- a/src/daemon/utils_subst_test.c +++ b/src/daemon/utils_subst_test.c @@ -26,6 +26,7 @@ #include "common.h" /* for STATIC_ARRAY_SIZE */ #include "collectd.h" + #include "testing.h" #include "utils_subst.h" @@ -75,9 +76,8 @@ DEF_TEST(subst) {"foo bar", 4, 3, "_", NULL}, /* off1 > off2 */ {"foo bar", 3, 4, NULL, NULL}, /* no replacement */ }; - size_t i; - for (i = 0; i < STATIC_ARRAY_SIZE (cases); i++) { + for (size_t i = 0; i < STATIC_ARRAY_SIZE (cases); i++) { char buffer[16] = "!!!!!!!!!!!!!!!"; if (cases[i].want == NULL) { @@ -108,9 +108,8 @@ DEF_TEST(subst_string) {"foo bar", "oo", "oo", "foo bar"}, {"sixteen chars", "chars", "characters", "sixteen charact"}, }; - size_t i; - for (i = 0; i < STATIC_ARRAY_SIZE (cases); i++) { + for (size_t i = 0; i < STATIC_ARRAY_SIZE (cases); i++) { char buffer[16]; if (cases[i].want == NULL) {