summaryrefslogtreecommitdiff
path: root/lib/northbound_cli.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/northbound_cli.c')
-rw-r--r--lib/northbound_cli.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/northbound_cli.c b/lib/northbound_cli.c
index 8ae44e72d5..c7378d2440 100644
--- a/lib/northbound_cli.c
+++ b/lib/northbound_cli.c
@@ -359,7 +359,7 @@ static int nb_cli_show_config_libyang(struct vty *vty, LYD_FORMAT format,
{
struct lyd_node *dnode;
char *strp;
- int options;
+ int options = 0;
dnode = yang_dnode_dup(config->dnode);
if (translator
@@ -371,11 +371,11 @@ static int nb_cli_show_config_libyang(struct vty *vty, LYD_FORMAT format,
return CMD_WARNING;
}
- options = LYP_FORMAT | LYP_WITHSIBLINGS;
+ SET_FLAG(options, LYP_FORMAT | LYP_WITHSIBLINGS);
if (with_defaults)
- options |= LYP_WD_ALL;
+ SET_FLAG(options, LYP_WD_ALL);
else
- options |= LYP_WD_TRIM;
+ SET_FLAG(options, LYP_WD_TRIM);
if (lyd_print_mem(&strp, dnode, format, options) == 0 && strp) {
vty_out(vty, "%s", strp);