[PATCH] core: minor coding style fixes
Aleksander Morgado
aleksander at aleksander.es
Tue May 20 00:35:55 PDT 2014
On 20/05/14 08:46, Ben Chan wrote:
> ---
> src/main.c | 2 +-
> src/mm-auth-provider-polkit.c | 8 ++--
> src/mm-base-modem.c | 2 +-
> src/mm-bearer-list.c | 2 +-
> src/mm-bearer-mbim.c | 2 +-
> src/mm-bearer-qmi.c | 2 +-
> src/mm-bearer-qmi.h | 2 +-
> src/mm-bearer.c | 2 +-
> src/mm-broadband-bearer.c | 2 +-
> src/mm-broadband-modem-mbim.c | 2 +-
> src/mm-broadband-modem-mbim.h | 8 ++--
> src/mm-broadband-modem-qmi.c | 2 +-
> src/mm-broadband-modem.c | 2 +-
> src/mm-charsets.c | 86 +++++++++++++++++++--------------------
> src/mm-device.c | 2 +-
> src/mm-log.h | 18 ++++----
> src/mm-manager.c | 6 +--
> src/mm-modem-helpers.c | 18 ++++----
> src/mm-plugin-manager.c | 6 +--
> src/mm-port-probe.c | 4 +-
> src/mm-port-serial-gps.c | 2 +-
> src/mm-port-serial.c | 2 +-
> src/mm-sim.c | 2 +-
> src/mm-sms-list.c | 2 +-
> src/mm-sms-part-cdma.c | 16 ++++----
> src/mm-sms.c | 2 +-
> src/tests/test-modem-helpers.c | 66 +++++++++++++++---------------
> src/tests/test-qcdm-serial-port.c | 12 +++---
> 28 files changed, 141 insertions(+), 141 deletions(-)
>
Pushed, thanks.
> diff --git a/src/main.c b/src/main.c
> index 78b3245..9762dab 100644
> --- a/src/main.c
> +++ b/src/main.c
> @@ -43,7 +43,7 @@ static MMManager *manager;
> static gboolean
> quit_cb (gpointer user_data)
> {
> - mm_info ("Caught signal, shutting down...");
> + mm_info ("Caught signal, shutting down...");
>
> if (manager)
> g_object_set (manager, MM_MANAGER_CONNECTION, NULL, NULL);
> diff --git a/src/mm-auth-provider-polkit.c b/src/mm-auth-provider-polkit.c
> index ae5b402..34f6c77 100644
> --- a/src/mm-auth-provider-polkit.c
> +++ b/src/mm-auth-provider-polkit.c
> @@ -76,8 +76,8 @@ check_authorization_ready (PolkitAuthority *authority,
> GAsyncResult *res,
> AuthorizeContext *ctx)
> {
> - PolkitAuthorizationResult *pk_result;
> - GError *error = NULL;
> + PolkitAuthorizationResult *pk_result;
> + GError *error = NULL;
>
> if (g_cancellable_is_cancelled (ctx->cancellable)) {
> g_simple_async_result_set_error (ctx->result,
> @@ -171,7 +171,7 @@ mm_auth_provider_polkit_init (MMAuthProviderPolkit *self)
> {
> GError *error = NULL;
>
> - self->priv = G_TYPE_INSTANCE_GET_PRIVATE ((self),
> + self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self,
> MM_TYPE_AUTH_PROVIDER_POLKIT,
> MMAuthProviderPolkitPrivate);
>
> @@ -181,7 +181,7 @@ mm_auth_provider_polkit_init (MMAuthProviderPolkit *self)
> * our AuthProvider. Every request will fail, though. */
> mm_warn ("failed to create PolicyKit authority: '%s'",
> error ? error->message : "unknown");
> - g_clear_error (&error);
> + g_clear_error (&error);
> }
> }
>
> diff --git a/src/mm-base-modem.c b/src/mm-base-modem.c
> index 9c709fc..715dc25 100644
> --- a/src/mm-base-modem.c
> +++ b/src/mm-base-modem.c
> @@ -1515,7 +1515,7 @@ static void
> mm_base_modem_init (MMBaseModem *self)
> {
> /* Initialize private data */
> - self->priv = G_TYPE_INSTANCE_GET_PRIVATE ((self),
> + self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self,
> MM_TYPE_BASE_MODEM,
> MMBaseModemPrivate);
>
> diff --git a/src/mm-bearer-list.c b/src/mm-bearer-list.c
> index 278ceba..ef1f839 100644
> --- a/src/mm-bearer-list.c
> +++ b/src/mm-bearer-list.c
> @@ -334,7 +334,7 @@ static void
> mm_bearer_list_init (MMBearerList *self)
> {
> /* Initialize private data */
> - self->priv = G_TYPE_INSTANCE_GET_PRIVATE ((self),
> + self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self,
> MM_TYPE_BEARER_LIST,
> MMBearerListPrivate);
> }
> diff --git a/src/mm-bearer-mbim.c b/src/mm-bearer-mbim.c
> index 83e363d..1f4adb0 100644
> --- a/src/mm-bearer-mbim.c
> +++ b/src/mm-bearer-mbim.c
> @@ -1161,7 +1161,7 @@ static void
> mm_bearer_mbim_init (MMBearerMbim *self)
> {
> /* Initialize private data */
> - self->priv = G_TYPE_INSTANCE_GET_PRIVATE ((self),
> + self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self,
> MM_TYPE_BEARER_MBIM,
> MMBearerMbimPrivate);
> }
> diff --git a/src/mm-bearer-qmi.c b/src/mm-bearer-qmi.c
> index 7152e94..4c693d2 100644
> --- a/src/mm-bearer-qmi.c
> +++ b/src/mm-bearer-qmi.c
> @@ -1229,7 +1229,7 @@ static void
> mm_bearer_qmi_init (MMBearerQmi *self)
> {
> /* Initialize private data */
> - self->priv = G_TYPE_INSTANCE_GET_PRIVATE ((self),
> + self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self,
> MM_TYPE_BEARER_QMI,
> MMBearerQmiPrivate);
> }
> diff --git a/src/mm-bearer-qmi.h b/src/mm-bearer-qmi.h
> index 915e170..77e8e18 100644
> --- a/src/mm-bearer-qmi.h
> +++ b/src/mm-bearer-qmi.h
> @@ -52,6 +52,6 @@ GType mm_bearer_qmi_get_type (void);
> /* QMI bearer creation implementation.
> * NOTE it is *not* a broadband bearer, so not async-initable */
> MMBearer *mm_bearer_qmi_new (MMBroadbandModemQmi *modem,
> - MMBearerProperties *config);
> + MMBearerProperties *config);
>
> #endif /* MM_BEARER_QMI_H */
> diff --git a/src/mm-bearer.c b/src/mm-bearer.c
> index 86b5a6b..12d1e58 100644
> --- a/src/mm-bearer.c
> +++ b/src/mm-bearer.c
> @@ -1116,7 +1116,7 @@ static void
> mm_bearer_init (MMBearer *self)
> {
> /* Initialize private data */
> - self->priv = G_TYPE_INSTANCE_GET_PRIVATE ((self),
> + self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self,
> MM_TYPE_BEARER,
> MMBearerPrivate);
> self->priv->status = MM_BEARER_STATUS_DISCONNECTED;
> diff --git a/src/mm-broadband-bearer.c b/src/mm-broadband-bearer.c
> index a697e08..00a7ba9 100644
> --- a/src/mm-broadband-bearer.c
> +++ b/src/mm-broadband-bearer.c
> @@ -2040,7 +2040,7 @@ static void
> mm_broadband_bearer_init (MMBroadbandBearer *self)
> {
> /* Initialize private data */
> - self->priv = G_TYPE_INSTANCE_GET_PRIVATE ((self),
> + self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self,
> MM_TYPE_BROADBAND_BEARER,
> MMBroadbandBearerPrivate);
>
> diff --git a/src/mm-broadband-modem-mbim.c b/src/mm-broadband-modem-mbim.c
> index df3eaa3..f842a37 100644
> --- a/src/mm-broadband-modem-mbim.c
> +++ b/src/mm-broadband-modem-mbim.c
> @@ -2839,7 +2839,7 @@ static void
> mm_broadband_modem_mbim_init (MMBroadbandModemMbim *self)
> {
> /* Initialize private data */
> - self->priv = G_TYPE_INSTANCE_GET_PRIVATE ((self),
> + self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self,
> MM_TYPE_BROADBAND_MODEM_MBIM,
> MMBroadbandModemMbimPrivate);
> }
> diff --git a/src/mm-broadband-modem-mbim.h b/src/mm-broadband-modem-mbim.h
> index c91c460..b8cf748 100644
> --- a/src/mm-broadband-modem-mbim.h
> +++ b/src/mm-broadband-modem-mbim.h
> @@ -41,9 +41,9 @@ struct _MMBroadbandModemMbimClass{
> GType mm_broadband_modem_mbim_get_type (void);
>
> MMBroadbandModemMbim *mm_broadband_modem_mbim_new (const gchar *device,
> - const gchar **drivers,
> - const gchar *plugin,
> - guint16 vendor_id,
> - guint16 product_id);
> + const gchar **drivers,
> + const gchar *plugin,
> + guint16 vendor_id,
> + guint16 product_id);
>
> #endif /* MM_BROADBAND_MODEM_MBIM_H */
> diff --git a/src/mm-broadband-modem-qmi.c b/src/mm-broadband-modem-qmi.c
> index a4c75a3..477b36e 100644
> --- a/src/mm-broadband-modem-qmi.c
> +++ b/src/mm-broadband-modem-qmi.c
> @@ -10130,7 +10130,7 @@ static void
> mm_broadband_modem_qmi_init (MMBroadbandModemQmi *self)
> {
> /* Initialize private data */
> - self->priv = G_TYPE_INSTANCE_GET_PRIVATE ((self),
> + self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self,
> MM_TYPE_BROADBAND_MODEM_QMI,
> MMBroadbandModemQmiPrivate);
> }
> diff --git a/src/mm-broadband-modem.c b/src/mm-broadband-modem.c
> index a987f85..0747ebe 100644
> --- a/src/mm-broadband-modem.c
> +++ b/src/mm-broadband-modem.c
> @@ -9553,7 +9553,7 @@ static void
> mm_broadband_modem_init (MMBroadbandModem *self)
> {
> /* Initialize private data */
> - self->priv = G_TYPE_INSTANCE_GET_PRIVATE ((self),
> + self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self,
> MM_TYPE_BROADBAND_MODEM,
> MMBroadbandModemPrivate);
> self->priv->modem_state = MM_MODEM_STATE_UNKNOWN;
> diff --git a/src/mm-charsets.c b/src/mm-charsets.c
> index 023879b..ffdcad5 100644
> --- a/src/mm-charsets.c
> +++ b/src/mm-charsets.c
> @@ -238,68 +238,68 @@ typedef struct GsmUtf8Mapping {
> * Mapping according to http://unicode.org/Public/MAPPINGS/ETSI/GSM0338.TXT
> */
> static const GsmUtf8Mapping gsm_def_utf8_alphabet[GSM_DEF_ALPHABET_SIZE] = {
> - /* @ £ $ ¥ */
> + /* @ £ $ ¥ */
> ONE(0x40), TWO(0xc2, 0xa3), ONE(0x24), TWO(0xc2, 0xa5),
> /* è é ù ì */
> - TWO(0xc3, 0xa8), TWO(0xc3, 0xa9), TWO(0xc3, 0xb9), TWO(0xc3, 0xac),
> - /* ò Ç \n Ø */
> + TWO(0xc3, 0xa8), TWO(0xc3, 0xa9), TWO(0xc3, 0xb9), TWO(0xc3, 0xac),
> + /* ò Ç \n Ø */
> TWO(0xc3, 0xb2), TWO(0xc3, 0x87), ONE(0x0a), TWO(0xc3, 0x98),
> /* ø \r Å å */
> TWO(0xc3, 0xb8), ONE(0x0d), TWO(0xc3, 0x85), TWO(0xc3, 0xa5),
> - /* Δ _ Φ Γ */
> + /* Δ _ Φ Γ */
> TWO(0xce, 0x94), ONE(0x5f), TWO(0xce, 0xa6), TWO(0xce, 0x93),
> /* Λ Ω Π Ψ */
> TWO(0xce, 0x9b), TWO(0xce, 0xa9), TWO(0xce, 0xa0), TWO(0xce, 0xa8),
> - /* Σ Θ Ξ Escape Code */
> + /* Σ Θ Ξ Escape Code */
> TWO(0xce, 0xa3), TWO(0xce, 0x98), TWO(0xce, 0x9e), ONE(0xa0),
> /* Æ æ ß É */
> TWO(0xc3, 0x86), TWO(0xc3, 0xa6), TWO(0xc3, 0x9f), TWO(0xc3, 0x89),
> - /* ' ' ! " # */
> + /* ' ' ! " # */
> ONE(0x20), ONE(0x21), ONE(0x22), ONE(0x23),
> /* ¤ % & ' */
> TWO(0xc2, 0xa4), ONE(0x25), ONE(0x26), ONE(0x27),
> - /* ( ) * + */
> + /* ( ) * + */
> ONE(0x28), ONE(0x29), ONE(0x2a), ONE(0x2b),
> /* , - . / */
> ONE(0x2c), ONE(0x2d), ONE(0x2e), ONE(0x2f),
> - /* 0 1 2 3 */
> - ONE(0x30), ONE(0x31), ONE(0x32), ONE(0x33),
> + /* 0 1 2 3 */
> + ONE(0x30), ONE(0x31), ONE(0x32), ONE(0x33),
> /* 4 5 6 7 */
> - ONE(0x34), ONE(0x35), ONE(0x36), ONE(0x37),
> - /* 8 9 : ; */
> - ONE(0x38), ONE(0x39), ONE(0x3a), ONE(0x3b),
> - /* < = > ? */
> - ONE(0x3c), ONE(0x3d), ONE(0x3e), ONE(0x3f),
> - /* ¡ A B C */
> - TWO(0xc2, 0xa1), ONE(0x41), ONE(0x42), ONE(0x43),
> - /* D E F G */
> - ONE(0x44), ONE(0x45), ONE(0x46), ONE(0x47),
> - /* H I J K */
> - ONE(0x48), ONE(0x49), ONE(0x4a), ONE(0x4b),
> - /* L M N O */
> - ONE(0x4c), ONE(0x4d), ONE(0x4e), ONE(0x4f),
> - /* P Q R S */
> - ONE(0x50), ONE(0x51), ONE(0x52), ONE(0x53),
> - /* T U V W */
> - ONE(0x54), ONE(0x55), ONE(0x56), ONE(0x57),
> - /* X Y Z Ä */
> - ONE(0x58), ONE(0x59), ONE(0x5a), TWO(0xc3, 0x84),
> - /* Ö Ñ Ü § */
> + ONE(0x34), ONE(0x35), ONE(0x36), ONE(0x37),
> + /* 8 9 : ; */
> + ONE(0x38), ONE(0x39), ONE(0x3a), ONE(0x3b),
> + /* < = > ? */
> + ONE(0x3c), ONE(0x3d), ONE(0x3e), ONE(0x3f),
> + /* ¡ A B C */
> + TWO(0xc2, 0xa1), ONE(0x41), ONE(0x42), ONE(0x43),
> + /* D E F G */
> + ONE(0x44), ONE(0x45), ONE(0x46), ONE(0x47),
> + /* H I J K */
> + ONE(0x48), ONE(0x49), ONE(0x4a), ONE(0x4b),
> + /* L M N O */
> + ONE(0x4c), ONE(0x4d), ONE(0x4e), ONE(0x4f),
> + /* P Q R S */
> + ONE(0x50), ONE(0x51), ONE(0x52), ONE(0x53),
> + /* T U V W */
> + ONE(0x54), ONE(0x55), ONE(0x56), ONE(0x57),
> + /* X Y Z Ä */
> + ONE(0x58), ONE(0x59), ONE(0x5a), TWO(0xc3, 0x84),
> + /* Ö Ñ Ü § */
> TWO(0xc3, 0x96), TWO(0xc3, 0x91), TWO(0xc3, 0x9c), TWO(0xc2, 0xa7),
> - /* ¿ a b c */
> - TWO(0xc2, 0xbf), ONE(0x61), ONE(0x62), ONE(0x63),
> - /* d e f g */
> - ONE(0x64), ONE(0x65), ONE(0x66), ONE(0x67),
> - /* h i j k */
> - ONE(0x68), ONE(0x69), ONE(0x6a), ONE(0x6b),
> - /* l m n o */
> - ONE(0x6c), ONE(0x6d), ONE(0x6e), ONE(0x6f),
> - /* p q r s */
> - ONE(0x70), ONE(0x71), ONE(0x72), ONE(0x73),
> - /* t u v w */
> - ONE(0x74), ONE(0x75), ONE(0x76), ONE(0x77),
> - /* x y z ä */
> - ONE(0x78), ONE(0x79), ONE(0x7a), TWO(0xc3, 0xa4),
> + /* ¿ a b c */
> + TWO(0xc2, 0xbf), ONE(0x61), ONE(0x62), ONE(0x63),
> + /* d e f g */
> + ONE(0x64), ONE(0x65), ONE(0x66), ONE(0x67),
> + /* h i j k */
> + ONE(0x68), ONE(0x69), ONE(0x6a), ONE(0x6b),
> + /* l m n o */
> + ONE(0x6c), ONE(0x6d), ONE(0x6e), ONE(0x6f),
> + /* p q r s */
> + ONE(0x70), ONE(0x71), ONE(0x72), ONE(0x73),
> + /* t u v w */
> + ONE(0x74), ONE(0x75), ONE(0x76), ONE(0x77),
> + /* x y z ä */
> + ONE(0x78), ONE(0x79), ONE(0x7a), TWO(0xc3, 0xa4),
> /* ö ñ ü à */
> TWO(0xc3, 0xb6), TWO(0xc3, 0xb1), TWO(0xc3, 0xbc), TWO(0xc3, 0xa0)
> };
> diff --git a/src/mm-device.c b/src/mm-device.c
> index 0d65d19..3e2e46f 100644
> --- a/src/mm-device.c
> +++ b/src/mm-device.c
> @@ -723,7 +723,7 @@ static void
> mm_device_init (MMDevice *self)
> {
> /* Initialize private data */
> - self->priv = G_TYPE_INSTANCE_GET_PRIVATE ((self),
> + self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self,
> MM_TYPE_DEVICE,
> MMDevicePrivate);
> }
> diff --git a/src/mm-log.h b/src/mm-log.h
> index 2576c1c..762f975 100644
> --- a/src/mm-log.h
> +++ b/src/mm-log.h
> @@ -20,26 +20,26 @@
>
> /* Log levels */
> enum {
> - LOGL_ERR = 0x00000001,
> - LOGL_WARN = 0x00000002,
> - LOGL_INFO = 0x00000004,
> - LOGL_DEBUG = 0x00000008
> + LOGL_ERR = 0x00000001,
> + LOGL_WARN = 0x00000002,
> + LOGL_INFO = 0x00000004,
> + LOGL_DEBUG = 0x00000008
> };
>
> #define mm_err(...) \
> - _mm_log (G_STRLOC, G_STRFUNC, LOGL_ERR, ## __VA_ARGS__ )
> + _mm_log (G_STRLOC, G_STRFUNC, LOGL_ERR, ## __VA_ARGS__ )
>
> #define mm_warn(...) \
> - _mm_log (G_STRLOC, G_STRFUNC, LOGL_WARN, ## __VA_ARGS__ )
> + _mm_log (G_STRLOC, G_STRFUNC, LOGL_WARN, ## __VA_ARGS__ )
>
> #define mm_info(...) \
> - _mm_log (G_STRLOC, G_STRFUNC, LOGL_INFO, ## __VA_ARGS__ )
> + _mm_log (G_STRLOC, G_STRFUNC, LOGL_INFO, ## __VA_ARGS__ )
>
> #define mm_dbg(...) \
> - _mm_log (G_STRLOC, G_STRFUNC, LOGL_DEBUG, ## __VA_ARGS__ )
> + _mm_log (G_STRLOC, G_STRFUNC, LOGL_DEBUG, ## __VA_ARGS__ )
>
> #define mm_log(level, ...) \
> - _mm_log (G_STRLOC, G_STRFUNC, level, ## __VA_ARGS__ )
> + _mm_log (G_STRLOC, G_STRFUNC, level, ## __VA_ARGS__ )
>
> void _mm_log (const char *loc,
> const char *func,
> diff --git a/src/mm-manager.c b/src/mm-manager.c
> index 3d5eea8..05aef12 100644
> --- a/src/mm-manager.c
> +++ b/src/mm-manager.c
> @@ -612,7 +612,7 @@ set_logging_auth_ready (MMAuthProvider *authp,
>
> if (!mm_auth_provider_authorize_finish (authp, res, &error))
> g_dbus_method_invocation_take_error (ctx->invocation, error);
> - else if (!mm_log_set_level (ctx->level, &error))
> + else if (!mm_log_set_level(ctx->level, &error))
> g_dbus_method_invocation_take_error (ctx->invocation, error);
> else {
> mm_info ("logging: level '%s'", ctx->level);
> @@ -868,7 +868,7 @@ mm_manager_init (MMManager *manager)
> const gchar *subsys[5] = { "tty", "net", "usb", "usbmisc", NULL };
>
> /* Setup private data */
> - manager->priv = priv = G_TYPE_INSTANCE_GET_PRIVATE ((manager),
> + manager->priv = priv = G_TYPE_INSTANCE_GET_PRIVATE (manager,
> MM_TYPE_MANAGER,
> MMManagerPrivate);
>
> @@ -983,7 +983,7 @@ finalize (GObject *object)
> static void
> initable_iface_init (GInitableIface *iface)
> {
> - iface->init = initable_init;
> + iface->init = initable_init;
> }
>
> static void
> diff --git a/src/mm-modem-helpers.c b/src/mm-modem-helpers.c
> index 8bdc0e7..e0395af 100644
> --- a/src/mm-modem-helpers.c
> +++ b/src/mm-modem-helpers.c
> @@ -1814,20 +1814,20 @@ mm_3gpp_parse_operator (const gchar *reply,
>
> if (reply && !strncmp (reply, "+COPS: ", 7)) {
> /* Got valid reply */
> - GRegex *r;
> - GMatchInfo *match_info;
> + GRegex *r;
> + GMatchInfo *match_info;
>
> - reply += 7;
> - r = g_regex_new ("(\\d),(\\d),\"(.+)\"", G_REGEX_UNGREEDY, 0, NULL);
> - if (!r)
> + reply += 7;
> + r = g_regex_new ("(\\d),(\\d),\"(.+)\"", G_REGEX_UNGREEDY, 0, NULL);
> + if (!r)
> return NULL;
>
> - g_regex_match (r, reply, 0, &match_info);
> - if (g_match_info_matches (match_info))
> + g_regex_match (r, reply, 0, &match_info);
> + if (g_match_info_matches (match_info))
> operator = g_match_info_fetch (match_info, 3);
>
> - g_match_info_free (match_info);
> - g_regex_unref (r);
> + g_match_info_free (match_info);
> + g_regex_unref (r);
> }
>
> if (operator) {
> diff --git a/src/mm-plugin-manager.c b/src/mm-plugin-manager.c
> index 12b8847..8c2fc31 100644
> --- a/src/mm-plugin-manager.c
> +++ b/src/mm-plugin-manager.c
> @@ -805,13 +805,13 @@ load_plugins (MMPluginManager *self,
> const gchar *fname;
> gchar *plugindir_display = NULL;
>
> - if (!g_module_supported ()) {
> + if (!g_module_supported ()) {
> g_set_error (error,
> MM_CORE_ERROR,
> MM_CORE_ERROR_UNSUPPORTED,
> "GModules are not supported on your platform!");
> goto out;
> - }
> + }
>
> /* Get printable UTF-8 string of the path */
> plugindir_display = g_filename_display_name (self->priv->plugin_dir);
> @@ -964,7 +964,7 @@ dispose (GObject *object)
> static void
> initable_iface_init (GInitableIface *iface)
> {
> - iface->init = initable_init;
> + iface->init = initable_init;
> }
>
> static void
> diff --git a/src/mm-port-probe.c b/src/mm-port-probe.c
> index a0028c7..e4faca0 100644
> --- a/src/mm-port-probe.c
> +++ b/src/mm-port-probe.c
> @@ -1661,8 +1661,8 @@ mm_port_probe_new (MMDevice *device,
> static void
> mm_port_probe_init (MMPortProbe *self)
> {
> - self->priv = G_TYPE_INSTANCE_GET_PRIVATE ((self), \
> - MM_TYPE_PORT_PROBE, \
> + self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self,
> + MM_TYPE_PORT_PROBE,
> MMPortProbePrivate);
> }
>
> diff --git a/src/mm-port-serial-gps.c b/src/mm-port-serial-gps.c
> index c6a346c..306df1f 100644
> --- a/src/mm-port-serial-gps.c
> +++ b/src/mm-port-serial-gps.c
> @@ -177,7 +177,7 @@ mm_port_serial_gps_new (const char *name)
> static void
> mm_port_serial_gps_init (MMPortSerialGps *self)
> {
> - self->priv = G_TYPE_INSTANCE_GET_PRIVATE ((self),
> + self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self,
> MM_TYPE_PORT_SERIAL_GPS,
> MMPortSerialGpsPrivate);
>
> diff --git a/src/mm-port-serial.c b/src/mm-port-serial.c
> index 859acb7..64eb13d 100644
> --- a/src/mm-port-serial.c
> +++ b/src/mm-port-serial.c
> @@ -2086,7 +2086,7 @@ mm_port_serial_class_init (MMPortSerialClass *klass)
> G_STRUCT_OFFSET (MMPortSerialClass, timed_out),
> NULL, NULL,
> g_cclosure_marshal_generic,
> - G_TYPE_NONE, 1, G_TYPE_UINT);
> + G_TYPE_NONE, 1, G_TYPE_UINT);
>
> signals[FORCED_CLOSE] =
> g_signal_new ("forced-close",
> diff --git a/src/mm-sim.c b/src/mm-sim.c
> index 7cd84ff..f3598de 100644
> --- a/src/mm-sim.c
> +++ b/src/mm-sim.c
> @@ -1706,7 +1706,7 @@ static void
> mm_sim_init (MMSim *self)
> {
> /* Initialize private data */
> - self->priv = G_TYPE_INSTANCE_GET_PRIVATE ((self),
> + self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self,
> MM_TYPE_SIM,
> MMSimPrivate);
> }
> diff --git a/src/mm-sms-list.c b/src/mm-sms-list.c
> index 79fb64c..dea6fd5 100644
> --- a/src/mm-sms-list.c
> +++ b/src/mm-sms-list.c
> @@ -439,7 +439,7 @@ static void
> mm_sms_list_init (MMSmsList *self)
> {
> /* Initialize private data */
> - self->priv = G_TYPE_INSTANCE_GET_PRIVATE ((self),
> + self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self,
> MM_TYPE_SMS_LIST,
> MMSmsListPrivate);
> }
> diff --git a/src/mm-sms-part-cdma.c b/src/mm-sms-part-cdma.c
> index 2f0c99a..3aa6b45 100644
> --- a/src/mm-sms-part-cdma.c
> +++ b/src/mm-sms-part-cdma.c
> @@ -358,14 +358,14 @@ read_teleservice_id (MMSmsPart *sms_part,
> teleservice_id = GUINT16_FROM_BE (teleservice_id);
>
> switch (teleservice_id){
> - case MM_SMS_CDMA_TELESERVICE_ID_CMT91:
> - case MM_SMS_CDMA_TELESERVICE_ID_WPT:
> - case MM_SMS_CDMA_TELESERVICE_ID_WMT:
> - case MM_SMS_CDMA_TELESERVICE_ID_VMN:
> - case MM_SMS_CDMA_TELESERVICE_ID_WAP:
> - case MM_SMS_CDMA_TELESERVICE_ID_WEMT:
> - case MM_SMS_CDMA_TELESERVICE_ID_SCPT:
> - case MM_SMS_CDMA_TELESERVICE_ID_CATPT:
> + case MM_SMS_CDMA_TELESERVICE_ID_CMT91:
> + case MM_SMS_CDMA_TELESERVICE_ID_WPT:
> + case MM_SMS_CDMA_TELESERVICE_ID_WMT:
> + case MM_SMS_CDMA_TELESERVICE_ID_VMN:
> + case MM_SMS_CDMA_TELESERVICE_ID_WAP:
> + case MM_SMS_CDMA_TELESERVICE_ID_WEMT:
> + case MM_SMS_CDMA_TELESERVICE_ID_SCPT:
> + case MM_SMS_CDMA_TELESERVICE_ID_CATPT:
> break;
> default:
> mm_dbg (" invalid teleservice ID found (%u): ignoring", teleservice_id);
> diff --git a/src/mm-sms.c b/src/mm-sms.c
> index 672d5bc..7b207a4 100644
> --- a/src/mm-sms.c
> +++ b/src/mm-sms.c
> @@ -1945,7 +1945,7 @@ static void
> mm_sms_init (MMSms *self)
> {
> /* Initialize private data */
> - self->priv = G_TYPE_INSTANCE_GET_PRIVATE ((self),
> + self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self,
> MM_TYPE_SMS,
> MMSmsPrivate);
> /* Defaults */
> diff --git a/src/tests/test-modem-helpers.c b/src/tests/test-modem-helpers.c
> index b4ff8a2..af28656 100644
> --- a/src/tests/test-modem-helpers.c
> +++ b/src/tests/test-modem-helpers.c
> @@ -2348,47 +2348,47 @@ _mm_log (const char *loc,
>
> int main (int argc, char **argv)
> {
> - GTestSuite *suite;
> + GTestSuite *suite;
> RegTestData *reg_data;
> gint result;
> DevidItem *item = &devids[0];
>
> g_type_init ();
> - g_test_init (&argc, &argv, NULL);
> + g_test_init (&argc, &argv, NULL);
>
> - suite = g_test_get_root ();
> + suite = g_test_get_root ();
> reg_data = reg_test_data_new ();
>
> - g_test_suite_add (suite, TESTCASE (test_cops_response_tm506, NULL));
> - g_test_suite_add (suite, TESTCASE (test_cops_response_gt3gplus, NULL));
> - g_test_suite_add (suite, TESTCASE (test_cops_response_ac881, NULL));
> - g_test_suite_add (suite, TESTCASE (test_cops_response_gtmax36, NULL));
> - g_test_suite_add (suite, TESTCASE (test_cops_response_ac860, NULL));
> - g_test_suite_add (suite, TESTCASE (test_cops_response_gtm378, NULL));
> - g_test_suite_add (suite, TESTCASE (test_cops_response_motoc, NULL));
> - g_test_suite_add (suite, TESTCASE (test_cops_response_mf627a, NULL));
> - g_test_suite_add (suite, TESTCASE (test_cops_response_mf627b, NULL));
> - g_test_suite_add (suite, TESTCASE (test_cops_response_e160g, NULL));
> - g_test_suite_add (suite, TESTCASE (test_cops_response_mercury, NULL));
> - g_test_suite_add (suite, TESTCASE (test_cops_response_quicksilver, NULL));
> - g_test_suite_add (suite, TESTCASE (test_cops_response_icon225, NULL));
> - g_test_suite_add (suite, TESTCASE (test_cops_response_icon452, NULL));
> - g_test_suite_add (suite, TESTCASE (test_cops_response_f3507g, NULL));
> - g_test_suite_add (suite, TESTCASE (test_cops_response_f3607gw, NULL));
> - g_test_suite_add (suite, TESTCASE (test_cops_response_mc8775, NULL));
> - g_test_suite_add (suite, TESTCASE (test_cops_response_n80, NULL));
> - g_test_suite_add (suite, TESTCASE (test_cops_response_e1550, NULL));
> - g_test_suite_add (suite, TESTCASE (test_cops_response_mf622, NULL));
> - g_test_suite_add (suite, TESTCASE (test_cops_response_e226, NULL));
> - g_test_suite_add (suite, TESTCASE (test_cops_response_xu870, NULL));
> - g_test_suite_add (suite, TESTCASE (test_cops_response_gtultraexpress, NULL));
> - g_test_suite_add (suite, TESTCASE (test_cops_response_n2720, NULL));
> - g_test_suite_add (suite, TESTCASE (test_cops_response_gobi, NULL));
> - g_test_suite_add (suite, TESTCASE (test_cops_response_sek600i, NULL));
> - g_test_suite_add (suite, TESTCASE (test_cops_response_samsung_z810, NULL));
> + g_test_suite_add (suite, TESTCASE (test_cops_response_tm506, NULL));
> + g_test_suite_add (suite, TESTCASE (test_cops_response_gt3gplus, NULL));
> + g_test_suite_add (suite, TESTCASE (test_cops_response_ac881, NULL));
> + g_test_suite_add (suite, TESTCASE (test_cops_response_gtmax36, NULL));
> + g_test_suite_add (suite, TESTCASE (test_cops_response_ac860, NULL));
> + g_test_suite_add (suite, TESTCASE (test_cops_response_gtm378, NULL));
> + g_test_suite_add (suite, TESTCASE (test_cops_response_motoc, NULL));
> + g_test_suite_add (suite, TESTCASE (test_cops_response_mf627a, NULL));
> + g_test_suite_add (suite, TESTCASE (test_cops_response_mf627b, NULL));
> + g_test_suite_add (suite, TESTCASE (test_cops_response_e160g, NULL));
> + g_test_suite_add (suite, TESTCASE (test_cops_response_mercury, NULL));
> + g_test_suite_add (suite, TESTCASE (test_cops_response_quicksilver, NULL));
> + g_test_suite_add (suite, TESTCASE (test_cops_response_icon225, NULL));
> + g_test_suite_add (suite, TESTCASE (test_cops_response_icon452, NULL));
> + g_test_suite_add (suite, TESTCASE (test_cops_response_f3507g, NULL));
> + g_test_suite_add (suite, TESTCASE (test_cops_response_f3607gw, NULL));
> + g_test_suite_add (suite, TESTCASE (test_cops_response_mc8775, NULL));
> + g_test_suite_add (suite, TESTCASE (test_cops_response_n80, NULL));
> + g_test_suite_add (suite, TESTCASE (test_cops_response_e1550, NULL));
> + g_test_suite_add (suite, TESTCASE (test_cops_response_mf622, NULL));
> + g_test_suite_add (suite, TESTCASE (test_cops_response_e226, NULL));
> + g_test_suite_add (suite, TESTCASE (test_cops_response_xu870, NULL));
> + g_test_suite_add (suite, TESTCASE (test_cops_response_gtultraexpress, NULL));
> + g_test_suite_add (suite, TESTCASE (test_cops_response_n2720, NULL));
> + g_test_suite_add (suite, TESTCASE (test_cops_response_gobi, NULL));
> + g_test_suite_add (suite, TESTCASE (test_cops_response_sek600i, NULL));
> + g_test_suite_add (suite, TESTCASE (test_cops_response_samsung_z810, NULL));
>
> g_test_suite_add (suite, TESTCASE (test_cops_response_gsm_invalid, NULL));
> - g_test_suite_add (suite, TESTCASE (test_cops_response_umts_invalid, NULL));
> + g_test_suite_add (suite, TESTCASE (test_cops_response_umts_invalid, NULL));
>
> g_test_suite_add (suite, TESTCASE (test_creg1_solicited, reg_data));
> g_test_suite_add (suite, TESTCASE (test_creg1_unsolicited, reg_data));
> @@ -2459,8 +2459,8 @@ int main (int argc, char **argv)
> g_test_suite_add (suite, TESTCASE (test_cgdcont_test_response_multiple_and_ignore, NULL));
> g_test_suite_add (suite, TESTCASE (test_cgdcont_test_response_single_context, NULL));
>
> - g_test_suite_add (suite, TESTCASE (test_cgdcont_read_response_nokia, NULL));
> - g_test_suite_add (suite, TESTCASE (test_cgdcont_read_response_samsung, NULL));
> + g_test_suite_add (suite, TESTCASE (test_cgdcont_read_response_nokia, NULL));
> + g_test_suite_add (suite, TESTCASE (test_cgdcont_read_response_samsung, NULL));
>
> g_test_suite_add (suite, TESTCASE (test_cnum_response_generic, NULL));
> g_test_suite_add (suite, TESTCASE (test_cnum_response_generic_without_detail, NULL));
> diff --git a/src/tests/test-qcdm-serial-port.c b/src/tests/test-qcdm-serial-port.c
> index 2f95a05..e7bc2f1 100644
> --- a/src/tests/test-qcdm-serial-port.c
> +++ b/src/tests/test-qcdm-serial-port.c
> @@ -401,7 +401,7 @@ test_leading_frame_markers (TestData *d)
> static void
> test_pty_create (TestData *d)
> {
> - struct termios stbuf;
> + struct termios stbuf;
> int ret, err;
>
> ret = openpty (&d->master, &d->slave, NULL, NULL, NULL);
> @@ -409,11 +409,11 @@ test_pty_create (TestData *d)
> d->valid = TRUE;
>
> /* set raw mode on the slave using kernel default parameters */
> - memset (&stbuf, 0, sizeof (stbuf));
> - tcgetattr (d->slave, &stbuf);
> - tcflush (d->slave, TCIOFLUSH);
> - cfmakeraw (&stbuf);
> - tcsetattr (d->slave, TCSANOW, &stbuf);
> + memset (&stbuf, 0, sizeof (stbuf));
> + tcgetattr (d->slave, &stbuf);
> + tcflush (d->slave, TCIOFLUSH);
> + cfmakeraw (&stbuf);
> + tcsetattr (d->slave, TCSANOW, &stbuf);
> fcntl (d->slave, F_SETFL, O_NONBLOCK);
>
> fcntl (d->master, F_SETFL, O_NONBLOCK);
>
--
Aleksander
https://aleksander.es
More information about the ModemManager-devel
mailing list