summaryrefslogtreecommitdiff
path: root/src/tmpfiles
diff options
context:
space:
mode:
authorThomas Hindoe Paaboel Andersen <phomes@gmail.com>2015-04-10 23:26:21 +0200
committerThomas Hindoe Paaboel Andersen <phomes@gmail.com>2015-04-10 23:28:08 +0200
commit75c2a9fd13bf2553e303443b5f25adf093892099 (patch)
tree37d4fac1a761f1e90a69d12f59b6f80473c36f45 /src/tmpfiles
parent733dbdc53425a00ac95328ef531bbfce263df5ec (diff)
tmpfiles: fix build with clang
Clang is not happy about using the cleanup attribute in switches
Diffstat (limited to 'src/tmpfiles')
-rw-r--r--src/tmpfiles/tmpfiles.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/tmpfiles/tmpfiles.c b/src/tmpfiles/tmpfiles.c
index 3ca9b4a263..ad5f3f6c6e 100644
--- a/src/tmpfiles/tmpfiles.c
+++ b/src/tmpfiles/tmpfiles.c
@@ -1082,6 +1082,7 @@ static const char *creation_mode_verb_table[_CREATION_MODE_MAX] = {
DEFINE_PRIVATE_STRING_TABLE_LOOKUP_TO_STRING(creation_mode_verb, CreationMode);
static int create_item(Item *i) {
+ _cleanup_free_ char *resolved = NULL;
struct stat st;
int r = 0;
CreationMode creation;
@@ -1106,8 +1107,6 @@ static int create_item(Item *i) {
break;
case COPY_FILES: {
- _cleanup_free_ char *resolved = NULL;
-
r = specifier_printf(i->argument, specifier_table, NULL, &resolved);
if (r < 0)
return log_error_errno(r, "Failed to substitute specifiers in copy source %s: %m", i->argument);
@@ -1233,8 +1232,6 @@ static int create_item(Item *i) {
}
case CREATE_SYMLINK: {
- _cleanup_free_ char *resolved = NULL;
-
r = specifier_printf(i->argument, specifier_table, NULL, &resolved);
if (r < 0)
return log_error_errno(r, "Failed to substitute specifiers in symlink target %s: %m", i->argument);