summaryrefslogtreecommitdiff
path: root/lib/if.c
diff options
context:
space:
mode:
authorDonald Sharp <donaldsharp72@gmail.com>2021-10-25 07:55:39 -0400
committerGitHub <noreply@github.com>2021-10-25 07:55:39 -0400
commit6f354338f98c173dc9cdc9165c03acdf5fc5685e (patch)
treef5c12250c4adce7667eb7ce3ddee9070e3013133 /lib/if.c
parentb793d3ce7103c10335047df83dd3cb68a376bff1 (diff)
parent2560505196b924f5c447f6c1d493ed9b74a13108 (diff)
Merge pull request #9824 from idryzhov/nb-cli-const-lyd-node
lib: northbound cli show/cmd functions must not modify data nodes
Diffstat (limited to 'lib/if.c')
-rw-r--r--lib/if.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/lib/if.c b/lib/if.c
index cb6270f5ec..41dc91a475 100644
--- a/lib/if.c
+++ b/lib/if.c
@@ -1255,8 +1255,8 @@ DEFPY_YANG (no_interface,
ifname, vrf_name);
}
-static void cli_show_interface(struct vty *vty, struct lyd_node *dnode,
- bool show_defaults)
+static void cli_show_interface(struct vty *vty, const struct lyd_node *dnode,
+ bool show_defaults)
{
const char *vrf;
@@ -1269,7 +1269,8 @@ static void cli_show_interface(struct vty *vty, struct lyd_node *dnode,
vty_out(vty, "\n");
}
-static void cli_show_interface_end(struct vty *vty, struct lyd_node *dnode)
+static void cli_show_interface_end(struct vty *vty,
+ const struct lyd_node *dnode)
{
vty_out(vty, "exit\n");
}
@@ -1305,8 +1306,9 @@ DEFPY_YANG (no_interface_desc,
return nb_cli_apply_changes(vty, NULL);
}
-static void cli_show_interface_desc(struct vty *vty, struct lyd_node *dnode,
- bool show_defaults)
+static void cli_show_interface_desc(struct vty *vty,
+ const struct lyd_node *dnode,
+ bool show_defaults)
{
vty_out(vty, " description %s\n", yang_dnode_get_string(dnode, NULL));
}