schema tree REFACTOR compile case like a general node
Change included - all choice data children are not linked
siblings anymore but standard children of their case.
Fixes #1157
diff --git a/src/tree_schema_helpers.c b/src/tree_schema_helpers.c
index 0623dbd..f239fe1 100644
--- a/src/tree_schema_helpers.c
+++ b/src/tree_schema_helpers.c
@@ -1358,11 +1358,7 @@
case LYS_CONTAINER:
return &((struct lysc_node_container *)node)->child;
case LYS_CHOICE:
- if (((struct lysc_node_choice *)node)->cases) {
- return &((struct lysc_node_choice *)node)->cases->child;
- } else {
- return NULL;
- }
+ return (struct lysc_node **)&((struct lysc_node_choice *)node)->cases;
case LYS_CASE:
return &((struct lysc_node_case *)node)->child;
case LYS_LIST: