summaryrefslogtreecommitdiff
path: root/src/manager.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2011-08-01 02:39:22 +0200
committerLennart Poettering <lennart@poettering.net>2011-08-01 02:39:22 +0200
commit44d91056924e1e64699892f71121b40c46489e57 (patch)
tree1ef1841e1e3a92f75519e7a3e3635ad078dc15a0 /src/manager.c
parent70132bd0425ce0a65ed24197a2bcbf1cb2931352 (diff)
util: use join() instead of asprintf() as an optimization
Diffstat (limited to 'src/manager.c')
-rw-r--r--src/manager.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/manager.c b/src/manager.c
index cdd618e148..9e4bd51d5c 100644
--- a/src/manager.c
+++ b/src/manager.c
@@ -560,7 +560,8 @@ static void manager_build_unit_path_cache(Manager *m) {
if (ignore_file(de->d_name))
continue;
- if (asprintf(&p, "%s/%s", streq(*i, "/") ? "" : *i, de->d_name) < 0) {
+ p = join(streq(*i, "/") ? "" : *i, "/", de->d_name, NULL);
+ if (!p) {
r = -ENOMEM;
goto fail;
}