[PATCH] broadband-modem: remove unnecessary G_SIMPLE_ASYNC_RESULT() casts
Aleksander Morgado
aleksander at lanedo.com
Thu Oct 24 08:10:41 PDT 2013
On 10/24/2013 04:52 PM, Ben Chan wrote:
> This patch removes unnecessary G_SIMPLE_ASYNC_RESULT() casts of the
> 'result' field, which is already of type GSimpleAsyncResult, of
> InitializeContext, EnablingContext and DisablingContext.
> ---
Pushed, thanks.
> src/mm-broadband-modem.c | 18 +++++++++---------
> 1 file changed, 9 insertions(+), 9 deletions(-)
>
> diff --git a/src/mm-broadband-modem.c b/src/mm-broadband-modem.c
> index 9d5a2b0..893dcde 100644
> --- a/src/mm-broadband-modem.c
> +++ b/src/mm-broadband-modem.c
> @@ -8072,7 +8072,7 @@ disable_finish (MMBaseModem *self,
> result, \
> &error)) { \
> if (FATAL_ERRORS) { \
> - g_simple_async_result_take_error (G_SIMPLE_ASYNC_RESULT (ctx->result), error); \
> + g_simple_async_result_take_error (ctx->result, error); \
> disabling_context_complete_and_free (ctx); \
> return; \
> } \
> @@ -8106,7 +8106,7 @@ bearer_list_disconnect_all_bearers_ready (MMBearerList *list,
> GError *error = NULL;
>
> if (!mm_bearer_list_disconnect_all_bearers_finish (list, res, &error)) {
> - g_simple_async_result_take_error (G_SIMPLE_ASYNC_RESULT (ctx->result), error);
> + g_simple_async_result_take_error (ctx->result, error);
> disabling_context_complete_and_free (ctx);
> return;
> }
> @@ -8125,7 +8125,7 @@ disabling_wait_for_final_state_ready (MMIfaceModem *self,
>
> ctx->previous_state = mm_iface_modem_wait_for_final_state_finish (self, res, &error);
> if (error) {
> - g_simple_async_result_take_error (G_SIMPLE_ASYNC_RESULT (ctx->result), error);
> + g_simple_async_result_take_error (ctx->result, error);
> disabling_context_complete_and_free (ctx);
> return;
> }
> @@ -8310,7 +8310,7 @@ disabling_step (DisablingContext *ctx)
> case DISABLING_STEP_LAST:
> ctx->disabled = TRUE;
> /* All disabled without errors! */
> - g_simple_async_result_set_op_res_gboolean (G_SIMPLE_ASYNC_RESULT (ctx->result), TRUE);
> + g_simple_async_result_set_op_res_gboolean (ctx->result, TRUE);
> disabling_context_complete_and_free (ctx);
> return;
> }
> @@ -8427,7 +8427,7 @@ enable_finish (MMBaseModem *self,
> result, \
> &error)) { \
> if (FATAL_ERRORS) { \
> - g_simple_async_result_take_error (G_SIMPLE_ASYNC_RESULT (ctx->result), error); \
> + g_simple_async_result_take_error (ctx->result, error); \
> enabling_context_complete_and_free (ctx); \
> return; \
> } \
> @@ -8460,7 +8460,7 @@ enabling_started_ready (MMBroadbandModem *self,
> GError *error = NULL;
>
> if (!MM_BROADBAND_MODEM_GET_CLASS (self)->enabling_started_finish (self, result, &error)) {
> - g_simple_async_result_take_error (G_SIMPLE_ASYNC_RESULT (ctx->result), error);
> + g_simple_async_result_take_error (ctx->result, error);
> enabling_context_complete_and_free (ctx);
> return;
> }
> @@ -8479,7 +8479,7 @@ enabling_wait_for_final_state_ready (MMIfaceModem *self,
>
> ctx->previous_state = mm_iface_modem_wait_for_final_state_finish (self, res, &error);
> if (error) {
> - g_simple_async_result_take_error (G_SIMPLE_ASYNC_RESULT (ctx->result), error);
> + g_simple_async_result_take_error (ctx->result, error);
> enabling_context_complete_and_free (ctx);
> return;
> }
> @@ -8657,7 +8657,7 @@ enabling_step (EnablingContext *ctx)
> case ENABLING_STEP_LAST:
> ctx->enabled = TRUE;
> /* All enabled without errors! */
> - g_simple_async_result_set_op_res_gboolean (G_SIMPLE_ASYNC_RESULT (ctx->result), TRUE);
> + g_simple_async_result_set_op_res_gboolean (ctx->result, TRUE);
> enabling_context_complete_and_free (ctx);
> return;
> }
> @@ -9146,7 +9146,7 @@ initialize_step (InitializeContext *ctx)
> MM_MODEM_STATE_DISABLED,
> MM_MODEM_STATE_CHANGE_REASON_UNKNOWN);
>
> - g_simple_async_result_set_op_res_gboolean (G_SIMPLE_ASYNC_RESULT (ctx->result), TRUE);
> + g_simple_async_result_set_op_res_gboolean (ctx->result, TRUE);
> initialize_context_complete_and_free (ctx);
> return;
> }
>
--
Aleksander
More information about the ModemManager-devel
mailing list