summaryrefslogtreecommitdiffstats
path: root/lib/northbound_confd.c
diff options
context:
space:
mode:
authorRenato Westphal <renato@opensourcerouting.org>2020-05-14 21:46:19 +0200
committerRenato Westphal <renato@opensourcerouting.org>2020-05-29 00:22:54 +0200
commit789193362bbf3d39bb2750693fa089de22778d88 (patch)
tree7ed28d55f3bfa68bb3095ab12b7c026260467653 /lib/northbound_confd.c
parent*: convert northbound callbacks to new error handling model (diff)
downloadfrr-789193362bbf3d39bb2750693fa089de22778d88.tar.xz
frr-789193362bbf3d39bb2750693fa089de22778d88.zip
lib: silence -Wformat-truncation warnings in the confd plugin
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
Diffstat (limited to 'lib/northbound_confd.c')
-rw-r--r--lib/northbound_confd.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/northbound_confd.c b/lib/northbound_confd.c
index 8d8944aea..a3aaf02f0 100644
--- a/lib/northbound_confd.c
+++ b/lib/northbound_confd.c
@@ -611,7 +611,7 @@ static int frr_confd_data_get_elem(struct confd_trans_ctx *tctx,
confd_hkeypath_t *kp)
{
struct nb_node *nb_node;
- char xpath[BUFSIZ];
+ char xpath[XPATH_MAXLEN];
struct yang_data *data;
confd_value_t v;
const void *list_entry = NULL;
@@ -649,7 +649,7 @@ static int frr_confd_data_get_next(struct confd_trans_ctx *tctx,
confd_hkeypath_t *kp, long next)
{
struct nb_node *nb_node;
- char xpath[BUFSIZ];
+ char xpath[XPATH_MAXLEN];
struct yang_data *data;
const void *parent_list_entry, *nb_next;
confd_value_t v[LIST_MAXKEYS];
@@ -757,8 +757,8 @@ static int frr_confd_data_get_object(struct confd_trans_ctx *tctx,
{
struct nb_node *nb_node;
const struct lys_node *child;
- char xpath[BUFSIZ];
- char xpath_child[XPATH_MAXLEN];
+ char xpath[XPATH_MAXLEN];
+ char xpath_child[XPATH_MAXLEN * 2];
struct list *elements;
struct yang_data *data;
const void *list_entry;
@@ -831,7 +831,7 @@ static int frr_confd_data_get_object(struct confd_trans_ctx *tctx,
static int frr_confd_data_get_next_object(struct confd_trans_ctx *tctx,
confd_hkeypath_t *kp, long next)
{
- char xpath[BUFSIZ];
+ char xpath[XPATH_MAXLEN];
struct nb_node *nb_node;
struct list *elements;
const void *parent_list_entry;
@@ -915,7 +915,7 @@ static int frr_confd_data_get_next_object(struct confd_trans_ctx *tctx,
/* Loop through list child nodes. */
LY_TREE_FOR (nb_node->snode->child, child) {
struct nb_node *nb_node_child = child->priv;
- char xpath_child[XPATH_MAXLEN];
+ char xpath_child[XPATH_MAXLEN * 2];
confd_value_t *v;
if (nvalues > CONFD_MAX_CHILD_NODES)
@@ -1058,7 +1058,7 @@ static int frr_confd_action_execute(struct confd_user_info *uinfo,
struct xml_tag *name, confd_hkeypath_t *kp,
confd_tag_value_t *params, int nparams)
{
- char xpath[BUFSIZ];
+ char xpath[XPATH_MAXLEN];
struct nb_node *nb_node;
struct list *input;
struct list *output;
@@ -1090,7 +1090,7 @@ static int frr_confd_action_execute(struct confd_user_info *uinfo,
/* Process input nodes. */
for (int i = 0; i < nparams; i++) {
- char xpath_input[BUFSIZ];
+ char xpath_input[XPATH_MAXLEN * 2];
char value_str[YANG_VALUE_MAXLEN];
snprintf(xpath_input, sizeof(xpath_input), "%s/%s", xpath,