parser json FEATURE support for nested ext instances with data
... such as schema-mount.
diff --git a/src/tree_data.h b/src/tree_data.h
index 65a9bda..e6250ce 100644
--- a/src/tree_data.h
+++ b/src/tree_data.h
@@ -495,7 +495,7 @@
* @param ELEM Iterator.
*/
#define LYD_LIST_FOR_INST_SAFE(START, SCHEMA, NEXT, ELEM) \
- for (lyd_find_sibling_val(START, SCHEMA, NULL, 0, &(ELEM)); \
+ for ((NEXT) = (ELEM) = NULL, lyd_find_sibling_val(START, SCHEMA, NULL, 0, &(ELEM)); \
(ELEM) && ((ELEM)->schema == (SCHEMA)) ? ((NEXT) = (ELEM)->next, 1) : 0; \
(ELEM) = (NEXT))