diff options
author | Lennart Poettering <lennart@poettering.net> | 2019-07-11 19:14:16 +0200 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2019-07-12 14:31:12 +0900 |
commit | b910cc72c0fb56d96bf98704450fba1f339d8527 (patch) | |
tree | c36280c1d426b1ec859ecb55872314d6a9855f35 /src/machine | |
parent | 6fa0524133ce54889f870d7ad17ab1d1832d7460 (diff) | |
download | systemd-b910cc72c0fb56d96bf98704450fba1f339d8527.tar.gz systemd-b910cc72c0fb56d96bf98704450fba1f339d8527.tar.bz2 systemd-b910cc72c0fb56d96bf98704450fba1f339d8527.zip |
tree-wide: get rid of strappend()
It's a special case of strjoin(), so no need to keep both. In particular
as typing strjoin() is even shoert than strappend().
Diffstat (limited to 'src/machine')
-rw-r--r-- | src/machine/image-dbus.c | 2 | ||||
-rw-r--r-- | src/machine/machine-dbus.c | 2 | ||||
-rw-r--r-- | src/machine/machine.c | 3 |
3 files changed, 4 insertions, 3 deletions
diff --git a/src/machine/image-dbus.c b/src/machine/image-dbus.c index 7e7f0d51bf..b45355d86f 100644 --- a/src/machine/image-dbus.c +++ b/src/machine/image-dbus.c @@ -458,7 +458,7 @@ char *image_bus_path(const char *name) { if (!e) return NULL; - return strappend("/org/freedesktop/machine1/image/", e); + return strjoin("/org/freedesktop/machine1/image/", e); } int image_node_enumerator(sd_bus *bus, const char *path, void *userdata, char ***nodes, sd_bus_error *error) { diff --git a/src/machine/machine-dbus.c b/src/machine/machine-dbus.c index b89e6046d9..0d58b5eb8b 100644 --- a/src/machine/machine-dbus.c +++ b/src/machine/machine-dbus.c @@ -1383,7 +1383,7 @@ char *machine_bus_path(Machine *m) { if (!e) return NULL; - return strappend("/org/freedesktop/machine1/machine/", e); + return strjoin("/org/freedesktop/machine1/machine/", e); } int machine_node_enumerator(sd_bus *bus, const char *path, void *userdata, char ***nodes, sd_bus_error *error) { diff --git a/src/machine/machine.c b/src/machine/machine.c index b203a1dde8..4d07a7893a 100644 --- a/src/machine/machine.c +++ b/src/machine/machine.c @@ -22,6 +22,7 @@ #include "machine.h" #include "mkdir.h" #include "parse-util.h" +#include "path-util.h" #include "process-util.h" #include "serialize.h" #include "special.h" @@ -53,7 +54,7 @@ Machine* machine_new(Manager *manager, MachineClass class, const char *name) { goto fail; if (class != MACHINE_HOST) { - m->state_file = strappend("/run/systemd/machines/", m->name); + m->state_file = path_join("/run/systemd/machines", m->name); if (!m->state_file) goto fail; } |