Fix conditionals to be sane

This commit is contained in:
John-Mark Bell 2012-11-09 23:21:41 +00:00
parent 2810fe764d
commit 79bd44fcb4
1 changed files with 2 additions and 2 deletions

View File

@ -41,9 +41,9 @@ dom_node *find_first_named_dom_element(dom_node *parent, lwc_string *element_nam
do {
exc = dom_node_get_node_type(element, &node_type);
if ((exc != DOM_NO_ERR) || (node_type == DOM_ELEMENT_NODE)) {
if ((exc == DOM_NO_ERR) && (node_type == DOM_ELEMENT_NODE)) {
exc = dom_node_get_node_name(element, &node_name);
if ((exc == DOM_NO_ERR) || (node_name != NULL)) {
if ((exc == DOM_NO_ERR) && (node_name != NULL)) {
if (dom_string_caseless_lwc_isequal(node_name,
element_name)) {
dom_string_unref(node_name);