[MM] [PATCH] sms-part: use g_set_error instead of g_error_new for consistency



---
 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;
     }
-- 
1.7.7.3



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]