Commit 9545a8bc authored by Thomas Haller's avatar Thomas Haller
Browse files

all: don't explicitly cast destroy function for g_clear_pointer()

The g_clear_pointer() macro already contains a cast to GDestroyNotify. No
need to do it ourself. In fact, with the cast, this only works with the
particular g_clear_pointer() implementation, that first assigns the
destroy function to a local variable.

See-also: https://bugzilla.gnome.org/show_bug.cgi?id=674634#c52
parent 9c4919be
......@@ -339,7 +339,7 @@ connect_context_clear (NMModemBroadband *self)
ConnectContext *ctx = self->_priv.ctx;
g_clear_error (&ctx->first_error);
g_clear_pointer (&ctx->ip_types, (GDestroyNotify) g_array_unref);
g_clear_pointer (&ctx->ip_types, g_array_unref);
nm_clear_g_cancellable (&ctx->cancellable);
g_clear_object (&ctx->connection);
g_clear_object (&ctx->connect_properties);
......
......@@ -3021,7 +3021,7 @@ dispose (GObject *object)
g_slist_free_full (priv->pending_auths, (GDestroyNotify) nm_auth_chain_unref);
priv->pending_auths = NULL;
g_clear_pointer (&priv->seen_bssids, (GDestroyNotify) g_hash_table_destroy);
g_clear_pointer (&priv->seen_bssids, g_hash_table_destroy);
set_visible (self, FALSE);
......
......@@ -1985,7 +1985,7 @@ dispose (GObject *object)
nm_clear_g_cancellable (&priv->other_cancellable);
g_clear_object (&priv->wpas_proxy);
g_clear_pointer (&priv->bss_proxies, (GDestroyNotify) g_hash_table_destroy);
g_clear_pointer (&priv->bss_proxies, g_hash_table_destroy);
g_clear_pointer (&priv->net_path, g_free);
g_clear_pointer (&priv->dev, g_free);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment