From 6b0a180b0e3ebcde3b067a813794a75f0ae7ec19 Mon Sep 17 00:00:00 2001 From: Adrian Szyndela Date: Wed, 8 Dec 2021 15:57:01 +0100 Subject: GVariant: reuse existing init function Reuse existing reader initialization function instead of inventing new code for the same purpose. Change-Id: If9cee9c565134c774c1f0efc0aaef661fde28f6c --- dbus/dbus-marshal-gvariant.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dbus/dbus-marshal-gvariant.c b/dbus/dbus-marshal-gvariant.c index a3ecb070..9f2f0e5d 100644 --- a/dbus/dbus-marshal-gvariant.c +++ b/dbus/dbus-marshal-gvariant.c @@ -26,6 +26,7 @@ #include "dbus-marshal-gvariant.h" #include "dbus-protocol-gvariant.h" #include "dbus-marshal-basic.h" +#include "dbus-marshal-recursive.h" #include "dbus-message-private.h" #include "dbus-signature.h" #include "dbus-connection-internal.h" @@ -1543,9 +1544,8 @@ _dbus_message_gvariant_convert_to_unlocked (DBusMessage *message) /* Initialize 'reader' for iterating over types from the signature. */ _dbus_string_init_const (&signature_str, signature); - reader.type_str = &signature_str; - reader.type_pos = 0; + _dbus_type_reader_init_types_only (&reader, &signature_str, 0); _dbus_type_reader_gvariant_init (&reader, message); /* If the last value is variable-sized, then the last offset is equal to the writing position -- cgit v1.2.3