diff options
author | Thomas Haller <thaller@redhat.com> | 2018-03-09 17:35:57 +0100 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2018-03-09 17:35:57 +0100 |
commit | d9a06042eb553acbecfcb51ab27180b9f02ece95 (patch) | |
tree | 0b7db4884942a7c4c8a8f2b19c3881465510f5ed | |
parent | bbf748c14ffe5f13c2517c51c696c1b775b42bd0 (diff) | |
download | NetworkManager-d9a06042eb553acbecfcb51ab27180b9f02ece95.tar.gz |
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.
-rw-r--r-- | src/platform/nm-platform.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/platform/nm-platform.c b/src/platform/nm-platform.c index 6f483fa654..7e2f27ced0 100644 --- a/src/platform/nm-platform.c +++ b/src/platform/nm-platform.c @@ -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) { |