chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
util: more join() optimizations
[elogind.git]
/
src
/
load-dropin.c
diff --git
a/src/load-dropin.c
b/src/load-dropin.c
index dbdc6a41df9a35ab09d133721cf60c23296e0d56..eafcc2fdf36ec83c1a2c25dd85057f3dbb926fb5 100644
(file)
--- 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;
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);
free(template);
- if (
r < 0
)
+ if (
!path
)
return -ENOMEM;
if (u->meta.manager->unit_path_cache &&
return -ENOMEM;
if (u->meta.manager->unit_path_cache &&