lib: fix northbound static analyzer warning

Make the function parameter `const` so the analyzer doesn't suspect we
are trying to change its value.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
This commit is contained in:
Rafael Zalamena 2019-06-03 11:11:34 -03:00
parent 2a573ff672
commit 020a390649

View File

@ -440,7 +440,7 @@ static int nb_cli_candidate_load_transaction(struct vty *vty,
* This function detects whether next node in the iteration is upwards, * This function detects whether next node in the iteration is upwards,
* then return the node otherwise return NULL. * then return the node otherwise return NULL.
*/ */
static struct lyd_node *ly_iter_next_up(struct lyd_node *elem) static struct lyd_node *ly_iter_next_up(const struct lyd_node *elem)
{ {
/* Are we going downwards? Is this still not a leaf? */ /* Are we going downwards? Is this still not a leaf? */
if (!(elem->schema->nodetype & (LYS_LEAF | LYS_LEAFLIST | LYS_ANYDATA))) if (!(elem->schema->nodetype & (LYS_LEAF | LYS_LEAFLIST | LYS_ANYDATA)))