Re: [MM] [PATCH] sms-part: use g_set_error instead of g_error_new for consistency
- From: Aleksander Morgado <aleksander lanedo com>
- To: Ben Chan <benchan chromium org>
- Cc: networkmanager-list gnome org
- Subject: Re: [MM] [PATCH] sms-part: use g_set_error instead of g_error_new for consistency
- Date: Mon, 27 Aug 2012 11:18:26 +0200
Pushed, thanks.
On 08/26/2012 06:34 AM, Ben Chan wrote:
> ---
> src/mm-sms-part.c | 11 ++++++-----
> 1 files changed, 6 insertions(+), 5 deletions(-)
>
> diff --git a/src/mm-sms-part.c b/src/mm-sms-part.c
> index 6637325..53b6678 100644
> --- a/src/mm-sms-part.c
> +++ b/src/mm-sms-part.c
> @@ -440,11 +440,12 @@ mm_sms_part_new_from_pdu (guint index,
> sender_addr_num_octets = (sender_addr_num_digits + 1) >> 1;
> variable_length_items += sender_addr_num_octets;
> if (pdu_len < variable_length_items + SMS_MIN_PDU_LEN) {
> - *error = g_error_new (MM_CORE_ERROR,
> - MM_CORE_ERROR_FAILED,
> - "PDU too short (2): %zd < %d",
> - pdu_len,
> - variable_length_items + SMS_MIN_PDU_LEN);
> + g_set_error (error,
> + MM_CORE_ERROR,
> + MM_CORE_ERROR_FAILED,
> + "PDU too short (2): %zd < %d",
> + pdu_len,
> + variable_length_items + SMS_MIN_PDU_LEN);
> g_free (pdu);
> return NULL;
> }
>
--
Aleksander
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]