summaryrefslogtreecommitdiff
path: root/src/core/machine-id-setup.c
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/core/machine-id-setup.c
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/core/machine-id-setup.c')
-rw-r--r--src/core/machine-id-setup.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/core/machine-id-setup.c b/src/core/machine-id-setup.c
index 7e0aee6a75..d00a53246f 100644
--- a/src/core/machine-id-setup.c
+++ b/src/core/machine-id-setup.c
@@ -73,7 +73,7 @@ static int generate(char id[34], const char *root) {
if (isempty(root))
dbus_machine_id = "/var/lib/dbus/machine-id";
else
- dbus_machine_id = strappenda(root, "/var/lib/dbus/machine-id");
+ dbus_machine_id = strjoina(root, "/var/lib/dbus/machine-id");
/* First, try reading the D-Bus machine id, unless it is a symlink */
fd = open(dbus_machine_id, O_RDONLY|O_CLOEXEC|O_NOCTTY|O_NOFOLLOW);
@@ -199,7 +199,7 @@ int machine_id_commit(const char *root) {
else {
char *x;
- x = strappenda(root, "/etc/machine-id");
+ x = strjoina(root, "/etc/machine-id");
etc_machine_id = path_kill_slashes(x);
}
@@ -281,10 +281,10 @@ int machine_id_setup(const char *root) {
} else {
char *x;
- x = strappenda(root, "/etc/machine-id");
+ x = strjoina(root, "/etc/machine-id");
etc_machine_id = path_kill_slashes(x);
- x = strappenda(root, "/run/machine-id");
+ x = strjoina(root, "/run/machine-id");
run_machine_id = path_kill_slashes(x);
}