diff BUGFIX do not reverse op for keys
They have no operation and are strictly
tied to the list instance.
@@ -1625,6 +1625,8 @@ lyd_diff_reverse_all(const struct lyd_node *src_diff, struct lyd_node **diff)
LY_LIST_FOR(*diff, root) {
LYD_TREE_DFS_BEGIN(root, elem) {
+ /* skip all keys */
+ if (!lysc_is_key(elem->schema)) {
/* find operation attribute, if any */
LY_CHECK_GOTO(ret = lyd_diff_get_op(elem, &op), cleanup);
@@ -1671,9 +1673,7 @@ lyd_diff_reverse_all(const struct lyd_node *src_diff, struct lyd_node **diff)
break;
}
break;
- default:
- /* nothing to do */
- break;
+ }
}
LYD_TREE_DFS_END(root, elem);
