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/network/networkd-link.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/network') diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c index acdb486381..a8d9bc0a13 100644 --- a/src/network/networkd-link.c +++ b/src/network/networkd-link.c @@ -1243,7 +1243,7 @@ static int link_set_ipv4_forward(Link *link) { b = link_ipv4_forward_enabled(link); - p = strappenda("/proc/sys/net/ipv4/conf/", link->ifname, "/forwarding"); + p = strjoina("/proc/sys/net/ipv4/conf/", link->ifname, "/forwarding"); r = write_string_file_no_create(p, one_zero(b)); if (r < 0) log_link_warning_errno(link, r, "Cannot configure IPv4 forwarding for interface %s: %m", link->ifname); @@ -1278,7 +1278,7 @@ static int link_set_ipv6_forward(Link *link) { const char *p = NULL; int r; - p = strappenda("/proc/sys/net/ipv6/conf/", link->ifname, "/forwarding"); + p = strjoina("/proc/sys/net/ipv6/conf/", link->ifname, "/forwarding"); r = write_string_file_no_create(p, one_zero(link_ipv6_forward_enabled(link))); if (r < 0) log_link_warning_errno(link, r, "Cannot configure IPv6 forwarding for interface: %m"); -- cgit v1.2.3-54-g00ecf