summaryrefslogtreecommitdiff
path: root/staticd/static_vty.c
diff options
context:
space:
mode:
authorDavid Lamparter <equinox@opensourcerouting.org>2023-01-26 14:56:04 +0100
committerDavid Lamparter <equinox@opensourcerouting.org>2023-01-27 12:01:20 +0100
commitae08de9f427ec6b71299ae2786cff19b98d0468f (patch)
treeeac8b492c20355de2a6e1e787cb00f0abfefb04f /staticd/static_vty.c
parentc84e51870940311bb6ec67d8b192da1ce32cba8f (diff)
*: fix non-const northbound XPath format strings
Passing a pre-formatted buffer in these places needs a `"%s"` in front so it doesn't get formatted twice. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Diffstat (limited to 'staticd/static_vty.c')
-rw-r--r--staticd/static_vty.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/staticd/static_vty.c b/staticd/static_vty.c
index ff79622038..c5bea755ec 100644
--- a/staticd/static_vty.c
+++ b/staticd/static_vty.c
@@ -377,7 +377,7 @@ static int static_route_nb_run(struct vty *vty, struct static_route_args *args)
}
}
- ret = nb_cli_apply_changes(vty, xpath_prefix);
+ ret = nb_cli_apply_changes(vty, "%s", xpath_prefix);
} else {
if (args->source)
snprintf(ab_xpath, sizeof(ab_xpath),
@@ -411,7 +411,7 @@ static int static_route_nb_run(struct vty *vty, struct static_route_args *args)
yang_dnode_get_path(dnode, ab_xpath, XPATH_MAXLEN);
nb_cli_enqueue_change(vty, ab_xpath, NB_OP_DESTROY, NULL);
- ret = nb_cli_apply_changes(vty, ab_xpath);
+ ret = nb_cli_apply_changes(vty, "%s", ab_xpath);
}
return ret;