]> git.meshlink.io Git - catta/blobdiff - avahi-daemon/dbus-util.c
2008-06-24 Dimitris Glezos <dimitris@glezos.com> (via glezos@fedoraproject.org)
[catta] / avahi-daemon / dbus-util.c
index c9ef949515eed2044c96bb4213f192b70e30b9dd..ca08d7b1dffb1461c57aed62fc187b51e39704ac 100644 (file)
@@ -341,12 +341,12 @@ int avahi_dbus_read_strlst(DBusMessage *m, int idx, AvahiStringList **l) {
 
         dbus_message_iter_recurse(&sub, &sub2);
             
-        if (dbus_message_iter_get_array_len(&sub2) > 0) 
-            dbus_message_iter_get_fixed_array(&sub2, &k, &n);
-        else {
+        k = (const uint8_t*) "";
+        n = 0;
+        dbus_message_iter_get_fixed_array(&sub2, &k, &n);
+
+        if (!k)
             k = (const uint8_t*) "";
-            n = 0;
-        }
             
         strlst = avahi_string_list_add_arbitrary(strlst, k, n);