mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-02-18 04:50:35 +01:00
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
This commit is contained in:
parent
9c4919be76
commit
9545a8bc34
3 changed files with 3 additions and 3 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue