From 897e7561a0f2b0e502fe57081b5d834876c49d7a Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Tue, 29 Oct 2013 20:09:16 +0100 Subject: strv: introduce new STRV_MAKE and STRV_MAKE_EMPTY macros to create string arrays nicely on the fly --- src/test/test-strv.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/test') diff --git a/src/test/test-strv.c b/src/test/test-strv.c index 7002b8b1c0..f32d02ed85 100644 --- a/src/test/test-strv.c +++ b/src/test/test-strv.c @@ -324,7 +324,7 @@ static void test_strv_foreach_pair(void) { } } -static void test_strv_from_stdarg_alloca_one(const char **l, const char *first, ...) { +static void test_strv_from_stdarg_alloca_one(char **l, const char *first, ...) { char **j; unsigned i; @@ -339,9 +339,9 @@ static void test_strv_from_stdarg_alloca_one(const char **l, const char *first, } static void test_strv_from_stdarg_alloca(void) { - test_strv_from_stdarg_alloca_one((const char*[]) { "foo", "bar", NULL }, "foo", "bar", NULL); - test_strv_from_stdarg_alloca_one((const char*[]) { "foo", "bar", NULL }, "foo", "bar", NULL); - test_strv_from_stdarg_alloca_one((const char*[]) { "foo", NULL }, "foo", NULL); + test_strv_from_stdarg_alloca_one(STRV_MAKE("foo", "bar"), "foo", "bar", NULL); + test_strv_from_stdarg_alloca_one(STRV_MAKE("foo"), "foo", NULL); + test_strv_from_stdarg_alloca_one(STRV_MAKE_EMPTY, NULL); } int main(int argc, char *argv[]) { -- cgit v1.2.3-54-g00ecf