tree data OPTIMIZE diff and lyd_insert_node()
Function lyd_insert_node() has new options that ignore the ordering of
data nodes. This is used in lyd_diff_add() because the diff as such
does not need to be sorted.
diff --git a/src/validation.c b/src/validation.c
index 1faf3f1..ecba13d 100644
--- a/src/validation.c
+++ b/src/validation.c
@@ -2047,7 +2047,7 @@
op_parent = lyd_parent(op_subtree);
lyd_unlink(op_subtree);
- lyd_insert_node(tree_parent, &tree_sibling, op_subtree, 0);
+ lyd_insert_node(tree_parent, &tree_sibling, op_subtree, LYD_INSERT_NODE_DEFAULT);
if (!dep_tree) {
dep_tree = tree_sibling;
}
@@ -2096,7 +2096,7 @@
lyd_insert_before_node(op_sibling_after, op_subtree);
lyd_insert_hash(op_subtree);
} else if (op_parent) {
- lyd_insert_node(op_parent, NULL, op_subtree, 0);
+ lyd_insert_node(op_parent, NULL, op_subtree, LYD_INSERT_NODE_DEFAULT);
}
ly_set_erase(&node_when, NULL);