X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Ftest%2Ftest-strv.c;h=c3d536d0579bca2c12bb9613d76279bdb2ad6a87;hb=464b3d64419808b7334563e907d172337cc9d718;hp=6513d2e07b01b5bd86164d04d076b8528b99f2a2;hpb=19f6d710772305610b928bc2678b9d77fe11e770;p=elogind.git diff --git a/src/test/test-strv.c b/src/test/test-strv.c index 6513d2e07..c3d536d05 100644 --- a/src/test/test-strv.c +++ b/src/test/test-strv.c @@ -27,19 +27,19 @@ #include "strv.h" static void test_specifier_printf(void) { - _cleanup_free_ char *w = NULL; - int r; - - const Specifier table[] = { + static const Specifier table[] = { { 'a', specifier_string, (char*) "AAAA" }, { 'b', specifier_string, (char*) "BBBB" }, { 'm', specifier_machine_id, NULL }, { 'B', specifier_boot_id, NULL }, { 'H', specifier_host_name, NULL }, { 'v', specifier_kernel_release, NULL }, - { 0, NULL, NULL } + {} }; + _cleanup_free_ char *w = NULL; + int r; + r = specifier_printf("xxx a=%a b=%b yyy", table, NULL, &w); assert_se(r >= 0); assert_se(w);