(rxml.c) Silence warnings

This commit is contained in:
Twinaphex 2014-10-14 22:21:58 +02:00
parent 03fb979730
commit e67bcb28d0

View File

@ -284,15 +284,20 @@ static struct rxml_node *rxml_parse_node(const char **ptr_)
/* Parse all child nodes. */ /* Parse all child nodes. */
struct rxml_node *list = NULL; struct rxml_node *list = NULL;
struct rxml_node *tail = NULL; struct rxml_node *tail = NULL;
const char *first_start = NULL, *first_closing = NULL;
const char *ptr = child_start; ptr = child_start;
first_start = strchr(ptr, '<');
first_closing = strstr(ptr, "</");
const char *first_start = strchr(ptr, '<'); while (
const char *first_closing = strstr(ptr, "</"); first_start &&
while (first_start && first_closing &&
first_closing && first_start < first_closing) (first_start < first_closing)
)
{ {
struct rxml_node *new_node = rxml_parse_node(&ptr); struct rxml_node *new_node = rxml_parse_node(&ptr);
if (!new_node) if (!new_node)
{ {
free(closing_tag); free(closing_tag);