summaryrefslogtreecommitdiff
path: root/src/network/networkd-link.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/network/networkd-link.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/network/networkd-link.c')
-rw-r--r--src/network/networkd-link.c4
1 files changed, 2 insertions, 2 deletions
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");