diff options
| author | Christian Hopps <chopps@labn.net> | 2025-02-17 09:43:11 +0000 | 
|---|---|---|
| committer | Christian Hopps <chopps@labn.net> | 2025-02-24 04:09:17 +0000 | 
| commit | 915dcd220df1c3a7d1fa3c783dff54d6135ccf83 (patch) | |
| tree | 29cf2e80c64779759f1bf22d0c6e4b29dbe7a7a3 /lib/yang.c | |
| parent | 3f290c97e8325bd9db9363b60e4a42ba8bdca90b (diff) | |
lib: northbound: support pre-built oper state in libyang tree
This also fixes a bug with specific (position specified) queries on keyless
lists. If the `get_next` callback is using the parent entry it will probably
crash as the code is passing the list_entry as both parent and child in the
specific lookup case.
There may currently be no code that uses the parent entry if the child entry is
non-NULL, though.
Signed-off-by: Christian Hopps <chopps@labn.net>
Diffstat (limited to 'lib/yang.c')
| -rw-r--r-- | lib/yang.c | 4 | 
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/yang.c b/lib/yang.c index dd48d8861b..955f49b00c 100644 --- a/lib/yang.c +++ b/lib/yang.c @@ -1358,8 +1358,8 @@ uint32_t yang_get_list_elements_count(const struct lyd_node *node)  	return count;  } -int yang_get_key_preds(char *s, const struct lysc_node *snode, -		       struct yang_list_keys *keys, ssize_t space) +int yang_get_key_preds(char *s, const struct lysc_node *snode, const struct yang_list_keys *keys, +		       ssize_t space)  {  	const struct lysc_node_leaf *skey;  	ssize_t len2, len = 0;  | 
