summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2015-10-12 11:05:04 +0200
committerThomas Haller <thaller@redhat.com>2015-10-12 11:10:48 +0200
commit76958f94d4f7a8536dc6fa8676bd8de31bc661c1 (patch)
tree579cc6bed0b80dd5be9850fd7ac72c931532e0be
parentf70f098d214634436277a53ae375e3dc2a819f7f (diff)
downloadNetworkManager-76958f94d4f7a8536dc6fa8676bd8de31bc661c1.tar.gz
macros: remove early return from nm_clear_g_signal_handler()
It is valid to call nm_clear_g_signal_handler() with missing @self argument if (and only if) the @id is unspecified as well. Remove the check for @self to get an assertion in case @id is missing *and* @self is invalid. In this case, g_signal_handler_disconnect() will raise a g_critical() for us. Fixes: c33416178f88353b2f424a18c576de09b6ae3215
-rw-r--r--include/nm-macros-internal.h3
1 files changed, 0 insertions, 3 deletions
diff --git a/include/nm-macros-internal.h b/include/nm-macros-internal.h
index 031c718ad6..80e9abf01b 100644
--- a/include/nm-macros-internal.h
+++ b/include/nm-macros-internal.h
@@ -210,9 +210,6 @@ nm_clear_g_source (guint *id)
static inline gboolean
nm_clear_g_signal_handler (gpointer self, guint *id)
{
- if (!self)
- return FALSE;
-
if (id && *id) {
g_signal_handler_disconnect (self, *id);
*id = 0;