summaryrefslogtreecommitdiff
path: root/src/network
diff options
context:
space:
mode:
authorDaniel Mack <github@zonque.org>2016-01-21 11:50:08 +0100
committerDaniel Mack <github@zonque.org>2016-01-21 11:50:08 +0100
commit9ecbcdffdf15bb76f57e8c403070dd43e206858d (patch)
tree421146d2e57a799d6ee8e62f3f80bcf4eba87885 /src/network
parent5c9ddf7ff49a89639e0d7fe86022f5f125803f45 (diff)
parent2a836ca9703689ba05513c98fb293b91a186a9ac (diff)
Merge pull request #2391 from keszybz/coverity
Coverity inspired fixes
Diffstat (limited to 'src/network')
-rw-r--r--src/network/networkd-manager.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/network/networkd-manager.c b/src/network/networkd-manager.c
index aeb6e34c52..24f5304cb0 100644
--- a/src/network/networkd-manager.c
+++ b/src/network/networkd-manager.c
@@ -659,15 +659,16 @@ static int manager_rtnl_process_link(sd_netlink *rtnl, sd_netlink_message *messa
} else if (ifindex <= 0) {
log_warning("rtnl: received link message with invalid ifindex: %d", ifindex);
return 0;
- } else
- link_get(m, ifindex, &link);
+ }
r = sd_netlink_message_read_string(message, IFLA_IFNAME, &name);
if (r < 0) {
log_warning_errno(r, "rtnl: Received link message without ifname: %m");
return 0;
- } else
- netdev_get(m, name, &netdev);
+ }
+
+ (void) link_get(m, ifindex, &link);
+ (void) netdev_get(m, name, &netdev);
switch (type) {
case RTM_NEWLINK: