diff options
author | Lennart Poettering <lennart@poettering.net> | 2011-08-01 01:28:01 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2011-08-01 01:28:01 +0200 |
commit | 911a4828e054a531be961cea34de89b666bda710 (patch) | |
tree | 4ba6454e7e3b08b578a91d1728062c4efbf233bc /src/load-dropin.c | |
parent | 57a8eca84a1eda99c8cfb63889fa300ba982cb77 (diff) |
util: introduce join() to speed up simple string concatenations
Diffstat (limited to 'src/load-dropin.c')
-rw-r--r-- | src/load-dropin.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/load-dropin.c b/src/load-dropin.c index d30865cbc5..984a47a297 100644 --- a/src/load-dropin.c +++ b/src/load-dropin.c @@ -78,7 +78,8 @@ static int process_dir(Unit *u, const char *unit_path, const char *name, const c assert(name); assert(suffix); - if (asprintf(&path, "%s/%s%s", unit_path, name, suffix) < 0) + path = join(unit_path, "/", name, suffix, NULL); + if (!path) return -ENOMEM; if (u->meta.manager->unit_path_cache && |