summaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2013-09-17 11:02:02 -0500
committerLennart Poettering <lennart@poettering.net>2013-09-17 11:02:54 -0500
commit1731e34a4ebddf6e1247ad252c7a45c2c1163f42 (patch)
treeb7497dda00d6f96dd794a49c12befdc73bfb7520 /src/test
parentf485606bf8957d2954cf6fa5b0aabd5c39db15c1 (diff)
tmpfiles: support simple specifier expansion for specified paths
Diffstat (limited to 'src/test')
-rw-r--r--src/test/test-strv.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/test/test-strv.c b/src/test/test-strv.c
index 6513d2e07b..c3d536d057 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);