mirror of
https://github.com/systemd/systemd.git
synced 2025-01-09 01:18:19 +03:00
network/nexthop: replace unreachable condition with assertion
This commit is contained in:
parent
d49312307e
commit
246b0a4d26
@ -420,8 +420,7 @@ static int nexthop_add_new(Manager *manager, uint32_t id, NextHop **ret) {
|
||||
r = hashmap_ensure_put(&manager->nexthops_by_id, &nexthop_hash_ops, UINT32_TO_PTR(nexthop->id), nexthop);
|
||||
if (r < 0)
|
||||
return r;
|
||||
if (r == 0)
|
||||
return -EEXIST;
|
||||
assert(r > 0);
|
||||
|
||||
nexthop->manager = manager;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user