1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-01 09:21:26 +03:00

test: make array in test-sysctl fully read-only

This commit is contained in:
Lennart Poettering 2021-09-14 23:13:23 +02:00
parent 20240b071b
commit 89edc243e4

View 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));