]> git.puffer.fish Git - mirror/frr.git/commitdiff
lib: fix northbound static analyzer warning
authorRafael Zalamena <rzalamena@opensourcerouting.org>
Mon, 3 Jun 2019 14:11:34 +0000 (11:11 -0300)
committerRafael Zalamena <rzalamena@opensourcerouting.org>
Sat, 22 Jun 2019 13:10:56 +0000 (10:10 -0300)
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>
lib/northbound_cli.c

index c96bfbdb9193f36dba0c13469112d3c6e835dc74..c691bb27aaf7f7a7a7db1db5206d3b1fb3b01f7a 100644 (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,
  * 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? */
        if (!(elem->schema->nodetype & (LYS_LEAF | LYS_LEAFLIST | LYS_ANYDATA)))