summaryrefslogtreecommitdiff
path: root/src/lib/eldbus
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2019-06-15 09:31:51 +0100
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2019-06-15 09:31:51 +0100
commit297fa2bca00e11a6c0ffabaf89a4899e73ccf957 (patch)
treeb9619fb4be9c5202114ca48c9c33874130e668e5 /src/lib/eldbus
parentb5ed76ba9f22ea659e9e6a3daa32c68354920455 (diff)
optimize - avoid eina_inlist_last where not needed
really minor places.
Diffstat (limited to 'src/lib/eldbus')
-rw-r--r--src/lib/eldbus/eldbus_introspection.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/lib/eldbus/eldbus_introspection.c b/src/lib/eldbus/eldbus_introspection.c
index 4338860..98ea865 100644
--- a/src/lib/eldbus/eldbus_introspection.c
+++ b/src/lib/eldbus/eldbus_introspection.c
@@ -31,12 +31,14 @@ eldbus_introspection_parse(const char *xml)
31 Eldbus_Introspection_Node *node; 31 Eldbus_Introspection_Node *node;
32 Eina_Simple_XML_Node_Root *xml_root; 32 Eina_Simple_XML_Node_Root *xml_root;
33 Eina_Simple_XML_Node *xml_node; 33 Eina_Simple_XML_Node *xml_node;
34 Eina_Inlist *last = NULL;
34 35
35 EINA_SAFETY_ON_NULL_RETURN_VAL(xml, NULL); 36 EINA_SAFETY_ON_NULL_RETURN_VAL(xml, NULL);
36 37
37 node = NULL; 38 node = NULL;
38 xml_root = eina_simple_xml_node_load(xml, strlen(xml), EINA_TRUE); 39 xml_root = eina_simple_xml_node_load(xml, strlen(xml), EINA_TRUE);
39 xml_node = (Eina_Simple_XML_Node*)eina_inlist_last(xml_root->children); 40 if (xml_root && xml_root->children) last = xml_root->children->last;
41 xml_node = (Eina_Simple_XML_Node *)last;
40 EINA_SAFETY_ON_FALSE_GOTO(EINA_SIMPLE_XML_NODE_TAG == xml_node->type, free_root); 42 EINA_SAFETY_ON_FALSE_GOTO(EINA_SIMPLE_XML_NODE_TAG == xml_node->type, free_root);
41 43
42 node = (Eldbus_Introspection_Node*)_eldbus_introspection_parse_node((Eina_Simple_XML_Node_Tag*)xml_node); 44 node = (Eldbus_Introspection_Node*)_eldbus_introspection_parse_node((Eina_Simple_XML_Node_Tag*)xml_node);