summaryrefslogtreecommitdiff
path: root/src/load-dropin.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/load-dropin.c
parent70132bd0425ce0a65ed24197a2bcbf1cb2931352 (diff)
util: use join() instead of asprintf() as an optimization
Diffstat (limited to 'src/load-dropin.c')
-rw-r--r--src/load-dropin.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/load-dropin.c b/src/load-dropin.c
index 984a47a297..dbdc6a41df 100644
--- a/src/load-dropin.c
+++ b/src/load-dropin.c
@@ -50,7 +50,8 @@ static int iterate_dir(Unit *u, const char *path, UnitDependency dependency) {
if (ignore_file(de->d_name))
continue;
- if (asprintf(&f, "%s/%s", path, de->d_name) < 0) {
+ f = join(path, "/", de->d_name, NULL);
+ if (!f) {
r = -ENOMEM;
goto finish;
}