summaryrefslogtreecommitdiff
path: root/src/network
diff options
context:
space:
mode:
Diffstat (limited to 'src/network')
-rw-r--r--src/network/networkctl.c2
-rw-r--r--src/network/networkd-link-bus.c2
-rw-r--r--src/network/networkd-link.c6
3 files changed, 5 insertions, 5 deletions
diff --git a/src/network/networkctl.c b/src/network/networkctl.c
index 97c1fe6560..ba7e3ba74a 100644
--- a/src/network/networkctl.c
+++ b/src/network/networkctl.c
@@ -521,7 +521,7 @@ static int link_status_one(
assert(rtnl);
assert(name);
- if (safe_atoi(name, &ifindex) >= 0 && ifindex > 0)
+ if (parse_ifindex(name, &ifindex) >= 0)
r = sd_rtnl_message_new_link(rtnl, &req, RTM_GETLINK, ifindex);
else {
r = sd_rtnl_message_new_link(rtnl, &req, RTM_GETLINK, 0);
diff --git a/src/network/networkd-link-bus.c b/src/network/networkd-link-bus.c
index 7fc4510ac9..11b35d6cf8 100644
--- a/src/network/networkd-link-bus.c
+++ b/src/network/networkd-link-bus.c
@@ -103,7 +103,7 @@ int link_object_find(sd_bus *bus, const char *path, const char *interface, void
if (r < 0)
return 0;
- r = safe_atoi(identifier, &ifindex);
+ r = parse_ifindex(identifier, &ifindex);
if (r < 0)
return 0;
diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c
index 7509feaf4e..46979ffa12 100644
--- a/src/network/networkd-link.c
+++ b/src/network/networkd-link.c
@@ -350,12 +350,12 @@ static void link_free(Link *link) {
while (!set_isempty(link->addresses))
address_free(set_first(link->addresses));
- set_free(link->addresses);
-
while (!set_isempty(link->addresses_foreign))
address_free(set_first(link->addresses_foreign));
- set_free(link->addresses_foreign);
+ link->addresses = set_free(link->addresses);
+
+ link->addresses_foreign = set_free(link->addresses_foreign);
while ((address = link->pool_addresses)) {
LIST_REMOVE(addresses, link->pool_addresses, address);