summaryrefslogtreecommitdiff
path: root/src/systemctl
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2015-02-03 02:05:59 +0100
committerLennart Poettering <lennart@poettering.net>2015-02-03 02:05:59 +0100
commit63c372cb9df3bee01e3bf8cd7f96f336bddda846 (patch)
treebf4d1b6e41f72927a2b58e7dd21daa0c496aaa96 /src/systemctl
parent44de0efc6e406515fc1cf8b95d9655d0d7f7ffff (diff)
util: rework strappenda(), and rename it strjoina()
After all it is now much more like strjoin() than strappend(). At the same time, add support for NULL sentinels, even if they are normally not necessary.
Diffstat (limited to 'src/systemctl')
-rw-r--r--src/systemctl/systemctl.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c
index 11b0be001..462f7fdc3 100644
--- a/src/systemctl/systemctl.c
+++ b/src/systemctl/systemctl.c
@@ -4978,8 +4978,8 @@ static int switch_root(sd_bus *bus, char **args) {
if (init) {
const char *root_systemd_path = NULL, *root_init_path = NULL;
- root_systemd_path = strappenda(root, "/" SYSTEMD_BINARY_PATH);
- root_init_path = strappenda(root, "/", init);
+ root_systemd_path = strjoina(root, "/" SYSTEMD_BINARY_PATH);
+ root_init_path = strjoina(root, "/", init);
/* If the passed init is actually the same as the
* systemd binary, then let's suppress it. */
@@ -5783,7 +5783,7 @@ static int unit_file_create_dropin(const char *unit_name, const char *user_home,
assert(ret_new_path);
assert(ret_tmp_path);
- ending = strappenda(unit_name, ".d/override.conf");
+ ending = strjoina(unit_name, ".d/override.conf");
r = get_file_to_edit(ending, user_home, user_runtime, &tmp_new_path);
if (r < 0)
return r;