core: reuse manager_get_runtime_prefix() at more places

This commit is contained in:
Lennart Poettering
2016-04-12 13:43:30 +02:00
parent e4bb56c7a9
commit 92dd7c4965
2 changed files with 10 additions and 20 deletions
+3 -8
View File
@@ -140,14 +140,9 @@ static int specifier_runtime(char specifier, void *data, void *userdata, char **
assert(u);
if (MANAGER_IS_SYSTEM(u->manager))
e = "/run";
else {
e = getenv("XDG_RUNTIME_DIR");
if (!e)
return -EOPNOTSUPP;
}
e = manager_get_runtime_prefix(u->manager);
if (!e)
return -EOPNOTSUPP;
n = strdup(e);
if (!n)
return -ENOMEM;