From 3b1f0d44229bfff06dd915d4d52a7f12062f5adc Mon Sep 17 00:00:00 2001 From: Ruben Kerkhof Date: Sat, 12 Mar 2016 15:38:01 +0100 Subject: [PATCH] utils_subst_test.c: constify --- src/daemon/utils_subst_test.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/daemon/utils_subst_test.c b/src/daemon/utils_subst_test.c index ec2e3514..953ccc4c 100644 --- a/src/daemon/utils_subst_test.c +++ b/src/daemon/utils_subst_test.c @@ -36,11 +36,11 @@ kstat_ctl_t *kc; DEF_TEST(subst) { struct { - char *str; + const char *str; int off1; int off2; - char *rplmt; - char *want; + const char *rplmt; + const char *want; } cases[] = { {"foo_____bar", 3, 8, " - ", "foo - bar"}, /* documentation example */ {"foo bar", 0, 2, "m", "mo bar"}, /* beginning, shorten */ @@ -95,7 +95,10 @@ DEF_TEST(subst) DEF_TEST(subst_string) { struct { - char *str; char *srch; char *rplmt; char *want; + const char *str; + const char *srch; + const char *rplmt; + const char *want; } cases[] = { {"Hello %{name}", "%{name}", "world", "Hello world"}, {"abcccccc", "abc", "cab", "ccccccab"}, -- 2.11.0