From 79bc29a3b241bbab01abedf479d7ebc9a2e07f6a Mon Sep 17 00:00:00 2001 From: Luca Oliva Date: Mon, 4 Mar 2024 10:13:32 +0100 Subject: [PATCH] Crating a new opaq leaflist node the value isn't populated. The value is passed to lyd_create_opaq as prefix parameter. --- src/tree_data_new.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/tree_data_new.c b/src/tree_data_new.c index 0351d76b4..f4a5eaa2d 100644 --- a/src/tree_data_new.c +++ b/src/tree_data_new.c @@ -1727,8 +1727,8 @@ lyd_new_path_(struct lyd_node *parent, const struct ly_ctx *ctx, const struct ly } if (r && (r != LY_EINCOMPLETE)) { /* creating opaque leaf-list */ - LY_CHECK_GOTO(ret = lyd_create_opaq(ctx, schema->name, strlen(schema->name), value, value_len, - schema->module->name, strlen(schema->module->name), NULL, 0, NULL, format, NULL, + LY_CHECK_GOTO(ret = lyd_create_opaq(ctx, schema->name, strlen(schema->name), NULL, 0, + schema->module->name, strlen(schema->module->name), value, value_len, NULL, format, NULL, LYD_NODEHINT_LEAFLIST, &node), cleanup); break; } @@ -1764,8 +1764,8 @@ lyd_new_path_(struct lyd_node *parent, const struct ly_ctx *ctx, const struct ly } if (r && (r != LY_EINCOMPLETE)) { /* creating opaque leaf */ - LY_CHECK_GOTO(ret = lyd_create_opaq(ctx, schema->name, strlen(schema->name), value, value_len, - schema->module->name, strlen(schema->module->name), NULL, 0, NULL, format, NULL, 0, &node), + LY_CHECK_GOTO(ret = lyd_create_opaq(ctx, schema->name, strlen(schema->name), NULL, 0, + schema->module->name, strlen(schema->module->name), value, value_len, NULL, format, NULL, 0, &node), cleanup); break; }