[PATCH 1/1] altair-lte: use mm_autoptr instead of g_autoptr

Aleksander Morgado aleksander at aleksander.es
Thu Dec 13 09:48:08 UTC 2018


On 13/12/18 1:58, Ben Chan wrote:
> commit 397faef3c5ce ("mm-common-helpers: add mm_autoptr helpers for
> GRegex and GMatchInfo") introduces mm_autoptr(), which implements
> g_autoptr() that isn't available before glib 2.44. This patch fixes the
> code to consistently uses mm_autoptr().

Oops, :) Thanks, good catch.

> ---
>  plugins/altair/mm-modem-helpers-altair-lte.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/plugins/altair/mm-modem-helpers-altair-lte.c b/plugins/altair/mm-modem-helpers-altair-lte.c
> index bb247d75..09c6f18f 100644
> --- a/plugins/altair/mm-modem-helpers-altair-lte.c
> +++ b/plugins/altair/mm-modem-helpers-altair-lte.c
> @@ -71,8 +71,8 @@ gchar *
>  mm_altair_parse_ceer_response (const gchar *response,
>                                 GError **error)
>  {
> -    g_autoptr(GRegex) r = NULL;
> -    g_autoptr(GMatchInfo) match_info = NULL;
> +    mm_autoptr(GRegex) r = NULL;
> +    mm_autoptr(GMatchInfo) match_info = NULL;
>      gchar *ceer_response = NULL;
>  
>  
> @@ -136,8 +136,8 @@ mm_altair_parse_cid (const gchar *response, GError **error)
>  MMPco *
>  mm_altair_parse_vendor_pco_info (const gchar *pco_info, GError **error)
>  {
> -    g_autoptr(GRegex) regex = NULL;
> -    g_autoptr(GMatchInfo) match_info = NULL;
> +    mm_autoptr(GRegex) regex = NULL;
> +    mm_autoptr(GMatchInfo) match_info = NULL;
>      MMPco *pco = NULL;
>      gint num_matches;
>  
> 


-- 
Aleksander
https://aleksander.es


More information about the ModemManager-devel mailing list