[PATCH] libmbim-glib,proxy: remove explicit GDestroyNotify cast on g_object_unref

Aleksander Morgado aleksander at aleksander.es
Wed Oct 17 07:04:27 UTC 2018


On 10/17/18 1:27 AM, Ben Chan wrote:
> g_object_unref is in form of  `void (*)(gpointer)`, which matches the
> GDestroyNotify signature. An explicit GDestroyNotify cast on
> g_object_unref is thus not needed.
> ---

Pushed to git master, thanks.

>  src/libmbim-glib/mbim-proxy.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/libmbim-glib/mbim-proxy.c b/src/libmbim-glib/mbim-proxy.c
> index 0e83f60..5df28be 100644
> --- a/src/libmbim-glib/mbim-proxy.c
> +++ b/src/libmbim-glib/mbim-proxy.c
> @@ -1406,7 +1406,7 @@ dispose (GObject *object)
>      }
>  
>      if (priv->devices) {
> -        g_list_free_full (priv->devices, (GDestroyNotify) g_object_unref);
> +        g_list_free_full (priv->devices, g_object_unref);
>          priv->devices = NULL;
>      }
>  
> 


-- 
Aleksander
https://aleksander.es


More information about the libmbim-devel mailing list