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>
This commit is contained in:
Philip Withnall 2019-10-29 18:46:39 +00:00
parent e825a98845
commit 96d792197a

View File

@ -1443,8 +1443,8 @@ parse_value_from_blob (GMemoryBuffer *buf,
guint indent, guint indent,
GError **error) GError **error)
{ {
GVariant *ret; GVariant *ret = NULL;
GError *local_error; GError *local_error = NULL;
#ifdef DEBUG_SERIALIZER #ifdef DEBUG_SERIALIZER
gboolean is_leaf; gboolean is_leaf;
#endif /* DEBUG_SERIALIZER */ #endif /* DEBUG_SERIALIZER */
@ -1465,12 +1465,9 @@ parse_value_from_blob (GMemoryBuffer *buf,
} }
#endif /* DEBUG_SERIALIZER */ #endif /* DEBUG_SERIALIZER */
ret = NULL;
#ifdef DEBUG_SERIALIZER #ifdef DEBUG_SERIALIZER
is_leaf = TRUE; is_leaf = TRUE;
#endif /* DEBUG_SERIALIZER */ #endif /* DEBUG_SERIALIZER */
local_error = NULL;
switch (type_string[0]) switch (type_string[0])
{ {
case 'b': /* G_VARIANT_TYPE_BOOLEAN */ case 'b': /* G_VARIANT_TYPE_BOOLEAN */