diff options
| author | Igor Ryzhov <iryzhov@nfware.com> | 2021-10-13 20:08:37 +0300 |
|---|---|---|
| committer | Igor Ryzhov <iryzhov@nfware.com> | 2021-10-13 20:12:35 +0300 |
| commit | 2560505196b924f5c447f6c1d493ed9b74a13108 (patch) | |
| tree | 515278e4362bf4f9c9418168df90a90b74946c20 /vrrpd/vrrp_vty.h | |
| parent | d7374bd3b1be5edfc20534ae5a301a0160c017bf (diff) | |
lib: northbound cli show/cmd functions must not modify data nodes
To ensure this, add a const modifier to functions' arguments. Would be
great do this initially and avoid this large code change, but better
late than never.
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
Diffstat (limited to 'vrrpd/vrrp_vty.h')
| -rw-r--r-- | vrrpd/vrrp_vty.h | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/vrrpd/vrrp_vty.h b/vrrpd/vrrp_vty.h index 6c6eef0327..587537a6f3 100644 --- a/vrrpd/vrrp_vty.h +++ b/vrrpd/vrrp_vty.h @@ -25,16 +25,20 @@ void vrrp_vty_init(void); /* Northbound callbacks */ -void cli_show_vrrp(struct vty *vty, struct lyd_node *dnode, bool show_defaults); -void cli_show_shutdown(struct vty *vty, struct lyd_node *dnode, +void cli_show_vrrp(struct vty *vty, const struct lyd_node *dnode, + bool show_defaults); +void cli_show_shutdown(struct vty *vty, const struct lyd_node *dnode, bool show_defaults); -void cli_show_priority(struct vty *vty, struct lyd_node *dnode, +void cli_show_priority(struct vty *vty, const struct lyd_node *dnode, bool show_defaults); -void cli_show_advertisement_interval(struct vty *vty, struct lyd_node *dnode, +void cli_show_advertisement_interval(struct vty *vty, + const struct lyd_node *dnode, bool show_defaults); -void cli_show_ip(struct vty *vty, struct lyd_node *dnode, bool show_defaults); -void cli_show_ipv6(struct vty *vty, struct lyd_node *dnode, bool show_defaults); -void cli_show_preempt(struct vty *vty, struct lyd_node *dnode, +void cli_show_ip(struct vty *vty, const struct lyd_node *dnode, + bool show_defaults); +void cli_show_ipv6(struct vty *vty, const struct lyd_node *dnode, + bool show_defaults); +void cli_show_preempt(struct vty *vty, const struct lyd_node *dnode, bool show_defaults); #endif /* __VRRP_VTY_H__ */ |
