projects
/
platform
/
upstream
/
systemd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c6dbb5c
)
network: use hashmap_steal_first() rather than hashmap_first()+hashmap_remove()
author
Yu Watanabe
<watanabe.yu+github@gmail.com>
Mon, 12 Nov 2018 06:33:18 +0000
(15:33 +0900)
committer
Yu Watanabe
<watanabe.yu+github@gmail.com>
Mon, 12 Nov 2018 07:32:11 +0000
(16:32 +0900)
src/network/networkd-manager.c
patch
|
blob
|
history
diff --git
a/src/network/networkd-manager.c
b/src/network/networkd-manager.c
index
fce8f46
..
fe481f1
100644
(file)
--- a/
src/network/networkd-manager.c
+++ b/
src/network/networkd-manager.c
@@
-1417,13
+1417,9
@@
void manager_free(Manager *m) {
manager_dhcp6_prefix_remove_all(m, link);
hashmap_free(m->dhcp6_prefixes);
- while ((link = hashmap_first(m->links))) {
+ while ((link = hashmap_
steal_
first(m->links))) {
if (link->dhcp6_client)
- (void) dhcp6_lease_pd_prefix_lost(link->dhcp6_client,
- link);
-
- hashmap_remove(m->links, INT_TO_PTR(link->ifindex));
-
+ (void) dhcp6_lease_pd_prefix_lost(link->dhcp6_client, link);
link_unref(link);
}