[gvfs/gdbus-core: 49/49] gdbus: Use g_variant_is_of_type() instead of strcmp()



commit ffd0031b6cce90332d744a7aad370e5cd694cbba
Author: Tomas Bzatek <tbzatek redhat com>
Date:   Tue Jul 31 12:11:15 2012 +0200

    gdbus: Use g_variant_is_of_type() instead of strcmp()

 daemon/gvfsbackendsftp.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/daemon/gvfsbackendsftp.c b/daemon/gvfsbackendsftp.c
index 672f8d4..190e20d 100644
--- a/daemon/gvfsbackendsftp.c
+++ b/daemon/gvfsbackendsftp.c
@@ -352,7 +352,7 @@ read_dbus_string_dict_value (GVariant *args, const gchar *key)
   const gchar *str, *val;
   gchar *res;
   
-  if (g_strcmp0 (g_variant_get_type_string (args), "(a{ss})") != 0)
+  if (! g_variant_is_of_type (args, G_VARIANT_TYPE ("(a{ss})")))
     return NULL;
   
   g_variant_get (args, "(@a{ss})", &a);



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