mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-02 06:30:12 +01:00
platform: minor cleanup in nmp_cache_update_netlink_route()
It reads nicer. It will also work better with the change that follows.
This commit is contained in:
parent
a3cea7f6fb
commit
c64053e6e6
1 changed files with 6 additions and 7 deletions
|
|
@ -2990,17 +2990,16 @@ nmp_cache_update_netlink_route(NMPCache *cache,
|
|||
|
||||
NM_SET_OUT(out_obj_old, nmp_object_ref(nm_dedup_multi_entry_get_obj(entry_old)));
|
||||
|
||||
if (!entry_old) {
|
||||
if (!nmp_object_is_alive(obj_hand_over))
|
||||
goto update_done;
|
||||
is_alive = nmp_object_is_alive(obj_hand_over);
|
||||
|
||||
_idxcache_update(cache, NULL, obj_hand_over, is_dump, &entry_new);
|
||||
ops_type = NMP_CACHE_OPS_ADDED;
|
||||
if (!entry_old) {
|
||||
if (is_alive) {
|
||||
_idxcache_update(cache, NULL, obj_hand_over, is_dump, &entry_new);
|
||||
ops_type = NMP_CACHE_OPS_ADDED;
|
||||
}
|
||||
goto update_done;
|
||||
}
|
||||
|
||||
is_alive = nmp_object_is_alive(obj_hand_over);
|
||||
|
||||
if (!is_alive) {
|
||||
/* the update would make @entry_old invalid. Remove it. */
|
||||
_idxcache_update(cache, entry_old, NULL, FALSE, NULL);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue