tree data OPTIMIZE added first_sibling parameter
This change avoids unnecessary finding of the first sibling in case
the parent node is not available.
diff --git a/src/validation.c b/src/validation.c
index 74653a7..1faf3f1 100644
--- a/src/validation.c
+++ b/src/validation.c
@@ -2090,7 +2090,7 @@
/* restore operation tree */
lyd_unlink(op_subtree);
if (op_sibling_before) {
- lyd_insert_after_node(op_sibling_before, op_subtree);
+ lyd_insert_after_node(NULL, op_sibling_before, op_subtree);
lyd_insert_hash(op_subtree);
} else if (op_sibling_after) {
lyd_insert_before_node(op_sibling_after, op_subtree);