From ae08de9f427ec6b71299ae2786cff19b98d0468f Mon Sep 17 00:00:00 2001 From: David Lamparter Date: Thu, 26 Jan 2023 14:56:04 +0100 Subject: *: 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 --- lib/if.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/if.c') diff --git a/lib/if.c b/lib/if.c index db73210036..b75c2a4dbe 100644 --- a/lib/if.c +++ b/lib/if.c @@ -1220,7 +1220,7 @@ DEFPY_YANG_NOSH (interface, } nb_cli_enqueue_change(vty, ".", NB_OP_CREATE, NULL); - ret = nb_cli_apply_changes_clear_pending(vty, xpath_list); + ret = nb_cli_apply_changes_clear_pending(vty, "%s", xpath_list); if (ret == CMD_SUCCESS) { VTY_PUSH_XPATH(INTERFACE_NODE, xpath_list); @@ -1279,7 +1279,7 @@ DEFPY_YANG (no_interface, nb_cli_enqueue_change(vty, ".", NB_OP_DESTROY, NULL); - return nb_cli_apply_changes(vty, xpath_list); + return nb_cli_apply_changes(vty, "%s", xpath_list); } static void netns_ifname_split(const char *xpath, char *ifname, char *vrfname) -- cgit v1.2.3