From 63c372cb9df3bee01e3bf8cd7f96f336bddda846 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Tue, 3 Feb 2015 02:05:59 +0100 Subject: 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. --- src/libsystemd/sd-login/sd-login.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/libsystemd/sd-login') diff --git a/src/libsystemd/sd-login/sd-login.c b/src/libsystemd/sd-login/sd-login.c index c72d23ed53..c171405a65 100644 --- a/src/libsystemd/sd-login/sd-login.c +++ b/src/libsystemd/sd-login/sd-login.c @@ -791,7 +791,7 @@ _public_ int sd_machine_get_class(const char *machine, char **class) { assert_return(machine_name_is_valid(machine), -EINVAL); assert_return(class, -EINVAL); - p = strappenda("/run/systemd/machines/", machine); + p = strjoina("/run/systemd/machines/", machine); r = parse_env_file(p, NEWLINE, "CLASS", &c, NULL); if (r < 0) return r; @@ -814,7 +814,7 @@ _public_ int sd_machine_get_ifindices(const char *machine, int **ifindices) { assert_return(machine_name_is_valid(machine), -EINVAL); assert_return(ifindices, -EINVAL); - p = strappenda("/run/systemd/machines/", machine); + p = strjoina("/run/systemd/machines/", machine); r = parse_env_file(p, NEWLINE, "NETIF", &netif, NULL); if (r < 0) return r; -- cgit v1.2.3-54-g00ecf