[glib/glib-2-62: 1/4] gdbusmessage: Move variable initialisation to declaration time
- From: Simon McVittie <smcv src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib/glib-2-62: 1/4] gdbusmessage: Move variable initialisation to declaration time
- Date: Thu, 19 Dec 2019 15:56:59 +0000 (UTC)
commit 391bff5a7a05621ca4fbea911783ef19796875c2
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]