diff options
| author | Christian Hopps <chopps@labn.net> | 2025-03-03 15:43:34 +0000 |
|---|---|---|
| committer | Christian Hopps <chopps@labn.net> | 2025-03-03 15:44:33 +0000 |
| commit | 37893e4421d900eaaab3891b02b7e6b2080c21c6 (patch) | |
| tree | 0fcc1c9cfb1c2523d47a2c050a6e822bb57aeea3 /lib/northbound_oper.c | |
| parent | ab5f41ef5485885be61849058b1af4ef77f6bbe7 (diff) | |
lib: nb: fix bug with keyless list specific index lookup
Signed-off-by: Christian Hopps <chopps@labn.net>
Diffstat (limited to 'lib/northbound_oper.c')
| -rw-r--r-- | lib/northbound_oper.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/northbound_oper.c b/lib/northbound_oper.c index b7815b001a..6a3c21b237 100644 --- a/lib/northbound_oper.c +++ b/lib/northbound_oper.c @@ -437,6 +437,7 @@ static enum nb_error nb_op_ys_finalize_node_info(struct nb_op_yield_state *ys, (index == 0 || ni[-1].lookup_next_ok); if (CHECK_FLAG(nn->flags, F_NB_NODE_KEYLESS_LIST)) { + const void *parent_list_entry; uint i; ni->position = nb_op_get_position_predicate(ys, ni); @@ -452,9 +453,10 @@ static enum nb_error nb_op_ys_finalize_node_info(struct nb_op_yield_state *ys, */ /* ni->list_entry starts as the parent entry of this node */ - ni->list_entry = nb_callback_get_next(nn, ni->list_entry, NULL); + parent_list_entry = ni->list_entry; + ni->list_entry = nb_callback_get_next(nn, parent_list_entry, NULL); for (i = 1; i < ni->position && ni->list_entry; i++) - ni->list_entry = nb_callback_get_next(nn, ni->list_entry, ni->list_entry); + ni->list_entry = nb_callback_get_next(nn, parent_list_entry, ni->list_entry); if (i != ni->position || !ni->list_entry) { flog_warn(EC_LIB_NB_OPERATIONAL_DATA, |
