dictionary REFACTOR unify functions pattern to return LY_ERR
Change API functions manipulating with libyang dictionary to return
LY_ERR value as a primary indicator of the result and the value from the
dictionary is returned via optional output parameter.
diff --git a/src/parser_xml.c b/src/parser_xml.c
index 496e9ff..43f6925 100644
--- a/src/parser_xml.c
+++ b/src/parser_xml.c
@@ -195,7 +195,7 @@
cleanup:
if (ret) {
- ly_free_attr_siblings(xmlctx->ctx, *attr);
+ lyd_free_attr_siblings(xmlctx->ctx, *attr);
*attr = NULL;
}
return ret;
@@ -611,7 +611,7 @@
error:
lyd_free_meta_siblings(meta);
- ly_free_attr_siblings(ctx, attr);
+ lyd_free_attr_siblings(ctx, attr);
lyd_free_tree(node);
return ret;
}
@@ -710,7 +710,7 @@
attr = NULL;
cleanup:
- ly_free_attr_siblings(xmlctx->ctx, attr);
+ lyd_free_attr_siblings(xmlctx->ctx, attr);
return ret;
}
@@ -897,7 +897,7 @@
cleanup:
if (ret) {
lyd_free_tree(*envp);
- ly_free_attr_siblings(xmlctx->ctx, attr);
+ lyd_free_attr_siblings(xmlctx->ctx, attr);
}
return ret;
}