mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-09 18:10:21 +01:00
platform: avoid one bug warning
This commit is contained in:
parent
10f9b6c58b
commit
21b6f34f5e
1 changed files with 6 additions and 2 deletions
|
|
@ -1060,14 +1060,18 @@ refresh_object (NMPlatform *platform, struct nl_object *object, gboolean removed
|
|||
announce_object (platform, cached_object, REMOVED, reason);
|
||||
}
|
||||
} else {
|
||||
g_return_val_if_fail (kernel_object, FALSE);
|
||||
if (!kernel_object)
|
||||
return FALSE;
|
||||
|
||||
hack_empty_master_iff_lower_up (platform, kernel_object);
|
||||
|
||||
if (cached_object)
|
||||
nl_cache_remove (cached_object);
|
||||
nle = nl_cache_add (cache, kernel_object);
|
||||
g_return_val_if_fail (!nle, FALSE);
|
||||
if (nle) {
|
||||
nm_log_dbg (LOGD_PLATFORM, "refresh_object(reason %d) failed during nl_cache_add with %d", reason, nle);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
announce_object (platform, kernel_object, cached_object ? CHANGED : ADDED, reason);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue