add: DEBUG_LOG("read_list(): called\n");
context: int read_list(xmlNode *list_node, list_t **dst, int read_content_only){	int res = 0;	xmlAttr *a;	const char *a_val;	xmlNode *n;	list_content_t *l, *last_l;		/* allocate memory and prepare empty node */	if (!dst) return -1;	*dst = (list_t*)cds_malloc(sizeof(list_t));	if (!(*dst)) return -2;	memset(*dst, 0, sizeof(list_t));	/* get attributes */	if (!read_content_only) {		a = find_attr(list_node->properties, "name");		if (a) {			a_val = get_attr_value(a);			if (a_val) (*dst)->name = zt_strdup(a_val);		}	}	/* read entries */	last_l = NULL;	n = list_node->children;	while (n) {		if (n->type == XML_ELEMENT_NODE) {			l = (list_content_t*) cds_malloc(sizeof(list_content_t));			if (!l) return -1;			memset(l, 0, sizeof(*l));						if (cmp_node(n, "list", rl_namespace) >= 0) {				res = read_list(n, &l->u.list, 0);				if (res == 0) {					if (l->u.list) {						l->type = lct_list;						SEQUENCE_ADD((*dst)->content, last_l, l);						l = NULL;					}				}				else break;			}						if (cmp_node(n, "entry", rl_namespace) >= 0) {				res = read_entry(n, &l->u.entry);				if (res == 0) {					if (l->u.entry) {						l->type = lct_entry;						SEQUENCE_ADD((*dst)->content, last_l, l);						l = NULL;					}				}				else break;			}						if (cmp_node(n, "entry-ref", rl_namespace) >= 0) {				res = read_entry_ref(n, &l->u.entry_ref);				if (res == 0) {					if (l->u.entry_ref) {						l->type = lct_entry_ref;						SEQUENCE_ADD((*dst)->content, last_l, l);						l = NULL;					}				}				else break;			}						if (cmp_node(n, "external", rl_namespace) >= 0) {				res = read_external(n, &l->u.external);				if (res == 0) {					if (l->u.external) {						l->type = lct_external;						SEQUENCE_ADD((*dst)->content, last_l, l);						l = NULL;					}				}				else break;			}						if (l) {				cds_free(l);				l = NULL;			}					}		n = n->next;	}		return 0;}