mirror of
https://github.com/systemd/systemd-stable.git
synced 2024-12-23 17:34:00 +03:00
network: network -- use ordered_hashmap_ensure_put
This commit is contained in:
parent
28d9587be5
commit
9fa3e794ac
@ -499,11 +499,7 @@ int network_load_one(Manager *manager, OrderedHashmap **networks, const char *fi
|
||||
/* Ignore .network files that do not match the conditions. */
|
||||
return 0;
|
||||
|
||||
r = ordered_hashmap_ensure_allocated(networks, &string_hash_ops);
|
||||
if (r < 0)
|
||||
return r;
|
||||
|
||||
r = ordered_hashmap_put(*networks, network->name, network);
|
||||
r = ordered_hashmap_ensure_put(networks, &string_hash_ops, network->name, network);
|
||||
if (r < 0)
|
||||
return r;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user