diff options
author | Lennart Poettering <lennart@poettering.net> | 2011-08-01 02:45:51 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2011-08-01 02:45:51 +0200 |
commit | cd0ed1db9b58900959866e7b265fae2b153b68c0 (patch) | |
tree | 5244252e3b4d3372f3d9c0e094a7063941d8b395 /src/load-dropin.c | |
parent | 44d91056924e1e64699892f71121b40c46489e57 (diff) |
util: more join() optimizations
Diffstat (limited to 'src/load-dropin.c')
-rw-r--r-- | src/load-dropin.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/load-dropin.c b/src/load-dropin.c index dbdc6a41df..eafcc2fdf3 100644 --- a/src/load-dropin.c +++ b/src/load-dropin.c @@ -100,10 +100,10 @@ static int process_dir(Unit *u, const char *unit_path, const char *name, const c if (!(template = unit_name_template(name))) return -ENOMEM; - r = asprintf(&path, "%s/%s%s", unit_path, template, suffix); + path = join(unit_path, "/", template, suffix, NULL); free(template); - if (r < 0) + if (!path) return -ENOMEM; if (u->meta.manager->unit_path_cache && |