From ae9a8d2c2fa9b657b20516737bf72dbc2be7102d Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Tue, 20 Jul 2010 12:58:29 -0500 Subject: Slight optimization to not create a useless structure. --- libdbusmenu-glib/client.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/libdbusmenu-glib/client.c b/libdbusmenu-glib/client.c index b59aecd..b68c3b3 100644 --- a/libdbusmenu-glib/client.c +++ b/libdbusmenu-glib/client.c @@ -618,10 +618,9 @@ id_update (DBusGProxy * proxy, gint id, DbusmenuClient * client) DbusmenuMenuitem * menuitem = dbusmenu_menuitem_find_id(priv->root, id); g_return_if_fail(menuitem != NULL); - gchar * properties[1] = {NULL}; /* This gets them all */ g_debug("Getting properties"); g_object_ref(menuitem); - get_properties_globber(client, id, (const gchar **)properties, menuitem_get_properties_cb, menuitem); + get_properties_globber(client, id, NULL, menuitem_get_properties_cb, menuitem); return; } @@ -1073,18 +1072,16 @@ parse_layout_xml(DbusmenuClient * client, xmlNodePtr node, DbusmenuMenuitem * it propdata->item = item; propdata->parent = parent; - gchar * properties[1] = {NULL}; /* This gets them all */ g_object_ref(item); - get_properties_globber(client, id, (const gchar **)properties, menuitem_get_properties_new_cb, propdata); + get_properties_globber(client, id, NULL, menuitem_get_properties_new_cb, propdata); } else { g_warning("Unable to allocate memory to get properties for menuitem. This menuitem will never be realized."); } } else { /* Refresh the properties */ /* XXX: We shouldn't need to get the properties everytime we reuse an entry */ - gchar * properties[1] = {NULL}; /* This gets them all */ g_object_ref(item); - get_properties_globber(client, id, (const gchar **)properties, menuitem_get_properties_replace_cb, item); + get_properties_globber(client, id, NULL, menuitem_get_properties_replace_cb, item); } xmlNodePtr children; -- cgit v1.2.3