summaryrefslogtreecommitdiff
path: root/src/libsystemd-rtnl/rtnl-util.c
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2013-12-15 14:00:20 +0100
committerTom Gundersen <teg@jklm.no>2013-12-16 17:28:18 +0100
commit0a0dc69b655cfb10cab39133f5d521e7b35ce3d5 (patch)
tree44c13edb1a91579d14e044c1b5f712ef379b8276 /src/libsystemd-rtnl/rtnl-util.c
parent0fc7531b40225475fed4ca8219b075bbdb54c5e0 (diff)
rtnl: replace message_append by typesafe versions
Diffstat (limited to 'src/libsystemd-rtnl/rtnl-util.c')
-rw-r--r--src/libsystemd-rtnl/rtnl-util.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libsystemd-rtnl/rtnl-util.c b/src/libsystemd-rtnl/rtnl-util.c
index 264b72ec37..dfc0050def 100644
--- a/src/libsystemd-rtnl/rtnl-util.c
+++ b/src/libsystemd-rtnl/rtnl-util.c
@@ -38,7 +38,7 @@ int rtnl_set_link_name(sd_rtnl *rtnl, int ifindex, const char *name) {
if (r < 0)
return r;
- r = sd_rtnl_message_append(message, IFLA_IFNAME, name);
+ r = sd_rtnl_message_append_string(message, IFLA_IFNAME, name);
if (r < 0)
return r;
@@ -66,7 +66,7 @@ int rtnl_set_link_properties(sd_rtnl *rtnl, int ifindex, const char *alias,
return r;
if (alias) {
- r = sd_rtnl_message_append(message, IFLA_IFALIAS, alias);
+ r = sd_rtnl_message_append_string(message, IFLA_IFALIAS, alias);
if (r < 0)
return r;
@@ -75,7 +75,7 @@ int rtnl_set_link_properties(sd_rtnl *rtnl, int ifindex, const char *alias,
}
if (mac) {
- r = sd_rtnl_message_append(message, IFLA_ADDRESS, mac);
+ r = sd_rtnl_message_append_ether_addr(message, IFLA_ADDRESS, mac);
if (r < 0)
return r;
@@ -83,7 +83,7 @@ int rtnl_set_link_properties(sd_rtnl *rtnl, int ifindex, const char *alias,
}
if (mtu > 0) {
- r = sd_rtnl_message_append(message, IFLA_MTU, &mtu);
+ r = sd_rtnl_message_append_u32(message, IFLA_MTU, mtu);
if (r < 0)
return r;