mirror of
https://github.com/systemd/systemd.git
synced 2024-11-01 09:21:26 +03:00
network: ndisc - Use ordered_set_ensure_put
This commit is contained in:
parent
32ae5db60a
commit
9b1fd1f55b
@ -1544,11 +1544,9 @@ int config_parse_address_generation_type(
|
|||||||
token->prefix = buffer.in6;
|
token->prefix = buffer.in6;
|
||||||
}
|
}
|
||||||
|
|
||||||
r = ordered_set_ensure_allocated(&network->ipv6_tokens, &ipv6_token_hash_ops);
|
r = ordered_set_ensure_put(&network->ipv6_tokens, &ipv6_token_hash_ops, token);
|
||||||
if (r < 0)
|
if (r == -ENOMEM)
|
||||||
return log_oom();
|
return log_oom();
|
||||||
|
|
||||||
r = ordered_set_put(network->ipv6_tokens, token);
|
|
||||||
if (r == -EEXIST)
|
if (r == -EEXIST)
|
||||||
log_syntax(unit, LOG_DEBUG, filename, line, r,
|
log_syntax(unit, LOG_DEBUG, filename, line, r,
|
||||||
"IPv6 token '%s' is duplicated, ignoring: %m", rvalue);
|
"IPv6 token '%s' is duplicated, ignoring: %m", rvalue);
|
||||||
|
Loading…
Reference in New Issue
Block a user