[glib: 1/4] gdbusmessage: Move variable initialisation to declaration time



commit 96d792197a34e22b0f40c659c482f119018d7cfd
Author: Philip Withnall <withnall endlessm com>
Date:   Tue Oct 29 18:46:39 2019 +0000

    gdbusmessage: Move variable initialisation to declaration time
    
    Tidies up the code a bit, but introduces no functional changes.
    
    Signed-off-by: Philip Withnall <withnall endlessm com>

 gio/gdbusmessage.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)
---
diff --git a/gio/gdbusmessage.c b/gio/gdbusmessage.c
index 852a70430..9914caa51 100644
--- a/gio/gdbusmessage.c
+++ b/gio/gdbusmessage.c
@@ -1443,8 +1443,8 @@ parse_value_from_blob (GMemoryBuffer       *buf,
                        guint                indent,
                        GError             **error)
 {
-  GVariant *ret;
-  GError *local_error;
+  GVariant *ret = NULL;
+  GError *local_error = NULL;
 #ifdef DEBUG_SERIALIZER
   gboolean is_leaf;
 #endif /* DEBUG_SERIALIZER */
@@ -1465,12 +1465,9 @@ parse_value_from_blob (GMemoryBuffer       *buf,
     }
 #endif /* DEBUG_SERIALIZER */
 
-  ret = NULL;
-
 #ifdef DEBUG_SERIALIZER
   is_leaf = TRUE;
 #endif /* DEBUG_SERIALIZER */
-  local_error = NULL;
   switch (type_string[0])
     {
     case 'b': /* G_VARIANT_TYPE_BOOLEAN */


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