From: Adam Dickmeiss Date: Fri, 6 Feb 2015 12:04:13 +0000 (+0100) Subject: Simple refactor due to yaz_match_xsd_element 0 check YAZ-822 X-Git-Tag: v5.9.1~1 X-Git-Url: http://sru.miketaylor.org.uk/?a=commitdiff_plain;h=a7718c404d9f9317caf075a1d1bbacc1484018a7;p=yaz-moved-to-github.git Simple refactor due to yaz_match_xsd_element 0 check YAZ-822 --- diff --git a/src/xml_to_opac.c b/src/xml_to_opac.c index 904e12d..139f12f 100644 --- a/src/xml_to_opac.c +++ b/src/xml_to_opac.c @@ -27,7 +27,7 @@ static int match_element_next(xmlNode **ptr, const char *elem, NMEM nmem, { while (*ptr && (*ptr)->type != XML_ELEMENT_NODE) (*ptr) = (*ptr)->next; - if (*ptr && yaz_match_xsd_string_n_nmem(*ptr, elem, nmem, val, 0)) + if (yaz_match_xsd_string_n_nmem(*ptr, elem, nmem, val, 0)) { *ptr = (*ptr)->next; return 1; @@ -42,7 +42,7 @@ static int match_v_next(xmlNode **ptr, const char *elem, NMEM nmem, while (*ptr && (*ptr)->type != XML_ELEMENT_NODE) (*ptr) = (*ptr)->next; *val = nmem_booldup(nmem, 0); - if (*ptr && yaz_match_xsd_element(*ptr, elem)) + if (yaz_match_xsd_element(*ptr, elem)) { struct _xmlAttr *attr = (*ptr)->properties;