]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test: make array in test-sysctl fully read-only
authorLennart Poettering <lennart@poettering.net>
Tue, 14 Sep 2021 21:13:23 +0000 (23:13 +0200)
committerLennart Poettering <lennart@poettering.net>
Wed, 15 Sep 2021 14:32:40 +0000 (16:32 +0200)
src/test/test-sysctl-util.c

index a6f449b76478ad88d147025742a02e11d67ea375..991a1e336300dd8754f920945257286193c878e2 100644 (file)
@@ -4,7 +4,7 @@
 #include "sysctl-util.h"
 #include "tests.h"
 
-static const char* cases[] = {
+static const char* const cases[] = {
         "a.b.c", "a/b/c",
         "a/b/c", "a/b/c",
         "a/b.c/d", "a/b.c/d",
@@ -24,7 +24,7 @@ static void test_sysctl_normalize(void) {
         log_info("/* %s */", __func__);
 
         const char **s, **expected;
-        STRV_FOREACH_PAIR(s, expected, cases) {
+        STRV_FOREACH_PAIR(s, expected, (const char**) cases) {
                 _cleanup_free_ char *t;
 
                 assert_se(t = strdup(*s));