Skip to content

Commit 0baa68f

Browse files
committed
validation BUGFIX avoid duplicates in node_when set
Refs #2436
1 parent 8d00d9d commit 0baa68f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/validation.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1969,7 +1969,7 @@ lyd_validate_tree(struct lyd_node *root, const struct lysc_ext_instance *ext, st
19691969

19701970
if (lysc_has_when(node->schema)) {
19711971
/* when evaluation */
1972-
r = ly_set_add(node_when, (void *)node, 0, NULL);
1972+
r = ly_set_add(node_when, (void *)node, 1, NULL);
19731973
LY_CHECK_ERR_GOTO(r, rc = r, cleanup);
19741974
}
19751975

@@ -2391,8 +2391,8 @@ _lyd_validate_op(struct lyd_node *op_tree, struct lyd_node *op_node, const struc
23912391
if (int_opts & LYD_INTOPT_REPLY) {
23922392
if (validate_subtree) {
23932393
/* add output children defaults */
2394-
rc = lyd_new_implicit(op_node, lyd_node_child_p(op_node), NULL, NULL, NULL, node_when_p, node_types_p,
2395-
LYD_IMPLICIT_OUTPUT, getnext_ht, diff);
2394+
rc = lyd_new_implicit(op_node, lyd_node_child_p(op_node), NULL, NULL, NULL, NULL, NULL, LYD_IMPLICIT_OUTPUT,
2395+
getnext_ht, diff);
23962396
LY_CHECK_GOTO(rc, cleanup);
23972397

23982398
/* skip validating the operation itself, go to children directly */

0 commit comments

Comments
 (0)