mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-04-22 09:20:46 +02:00
platform: minor cleanup of assertions in nm_platform_cache_update_emit_signal()
NMTST_ASSERT_PLATFORM_NETNS_CURRENT() already checks that the current namespace is correct. Remove the duplicate assertion. Also, NMP_CACHE_OPS_UNCHANGED is numerically identical to NM_PLATFORM_SIGNAL_NONE. Use it in the assertion.
This commit is contained in:
parent
a2f1a93817
commit
d6bbac1b7d
1 changed files with 4 additions and 5 deletions
|
|
@ -6415,14 +6415,13 @@ nm_platform_cache_update_emit_signal (NMPlatform *self,
|
|||
const NMPObject *o;
|
||||
const NMPClass *klass;
|
||||
|
||||
nm_assert (NM_IN_SET ((NMPlatformSignalChangeType) cache_op, (NMPlatformSignalChangeType) NMP_CACHE_OPS_UNCHANGED, NM_PLATFORM_SIGNAL_ADDED, NM_PLATFORM_SIGNAL_CHANGED, NM_PLATFORM_SIGNAL_REMOVED));
|
||||
nm_assert (NM_IN_SET ((NMPlatformSignalChangeType) cache_op, NM_PLATFORM_SIGNAL_NONE,
|
||||
NM_PLATFORM_SIGNAL_ADDED,
|
||||
NM_PLATFORM_SIGNAL_CHANGED,
|
||||
NM_PLATFORM_SIGNAL_REMOVED));
|
||||
|
||||
ASSERT_nmp_cache_ops (nm_platform_get_cache (self), cache_op, obj_old, obj_new);
|
||||
|
||||
nm_assert (NM_IN_SET (nm_platform_netns_get (self),
|
||||
NULL,
|
||||
nmp_netns_get_current ()));
|
||||
|
||||
NMTST_ASSERT_PLATFORM_NETNS_CURRENT (self);
|
||||
|
||||
switch (cache_op) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue