]> git.puffer.fish Git - matthieu/frr.git/commitdiff
pimd: fix compile warnings
authorJafar Al-Gharaibeh <jafar@atcorp.com>
Mon, 22 Jul 2024 16:19:50 +0000 (11:19 -0500)
committerJafar Al-Gharaibeh <jafar@atcorp.com>
Mon, 22 Jul 2024 16:35:47 +0000 (11:35 -0500)
Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
pimd/pim_cmd.c
pimd/pim_cmd_common.c

index 2b8d3e56e52108696e92fe171a606d41644ae296..92214eced4ae614655c618fbdfda223482cc00d5 100644 (file)
@@ -1457,7 +1457,7 @@ static void clear_interfaces(struct pim_instance *pim)
 static void pim_cli_legacy_mesh_group_behavior(struct vty *vty,
                                               const char *gname)
 {
-       char xpath_value[XPATH_MAXLEN];
+       char xpath_value[XPATH_MAXLEN + 26];
        char xpath_member_value[XPATH_MAXLEN];
        const struct lyd_node *member_dnode;
 
@@ -4314,7 +4314,7 @@ DEFPY (no_pim_ssm_prefix_list_name,
        "Name of a prefix-list\n")
 {
        const struct lyd_node *ssm_plist_dnode;
-       char ssm_plist_xpath[XPATH_MAXLEN];
+       char ssm_plist_xpath[XPATH_MAXLEN + 16];
        const char *ssm_plist_name;
 
        snprintf(ssm_plist_xpath, sizeof(ssm_plist_xpath), "%s/ssm-prefix-list",
@@ -4350,7 +4350,7 @@ DEFPY_ATTR(no_ip_pim_ssm_prefix_list_name,
                          CMD_ATTR_HIDDEN | CMD_ATTR_DEPRECATED)
 {
        const struct lyd_node *ssm_plist_dnode;
-       char ssm_plist_xpath[XPATH_MAXLEN];
+       char ssm_plist_xpath[XPATH_MAXLEN + 16];
        const char *ssm_plist_name;
        int ret = CMD_WARNING_CONFIG_FAILED;
        const char *vrfname;
@@ -6574,7 +6574,7 @@ DEFPY(no_pim_msdp_mesh_group_member,
       "Mesh group member\n"
       "Peer IP address\n")
 {
-       char xpath_value[XPATH_MAXLEN];
+       char xpath_value[XPATH_MAXLEN + 26];
        char xpath_member_value[XPATH_MAXLEN];
 
        /* Get mesh group base XPath. */
@@ -6620,7 +6620,7 @@ DEFPY_ATTR(no_ip_pim_msdp_mesh_group_member,
                          "Peer IP address\n",
                          CMD_ATTR_HIDDEN | CMD_ATTR_DEPRECATED)
 {
-       char xpath_value[XPATH_MAXLEN];
+       char xpath_value[XPATH_MAXLEN + 26];
        char xpath_member_value[XPATH_MAXLEN];
        int ret = CMD_WARNING_CONFIG_FAILED;
        const char *vrfname;
@@ -6852,7 +6852,7 @@ DEFPY(no_pim_msdp_mesh_group,
       "Delete MSDP mesh-group\n"
       "Mesh group name\n")
 {
-       char xpath_value[XPATH_MAXLEN];
+       char xpath_value[XPATH_MAXLEN + 26];
 
        /* Get mesh group base XPath. */
        snprintf(xpath_value, sizeof(xpath_value),
@@ -6873,7 +6873,7 @@ DEFPY_ATTR(no_ip_pim_msdp_mesh_group,
                          "Mesh group name\n",
                          CMD_ATTR_HIDDEN | CMD_ATTR_DEPRECATED)
 {
-       char xpath_value[XPATH_MAXLEN];
+       char xpath_value[XPATH_MAXLEN + 26];
        int ret = CMD_SUCCESS;
        const char *vrfname;
        char xpath[XPATH_MAXLEN];
index c6cb28c097b9156df4b2718d400eb9e2a9f327f7..d1368ff1ffe496fc13b06fdec1b4cd89fababa12 100644 (file)
@@ -100,8 +100,8 @@ int pim_process_no_join_prune_cmd(struct vty *vty)
 
 int pim_process_spt_switchover_infinity_cmd(struct vty *vty)
 {
-       char spt_plist_xpath[XPATH_MAXLEN];
-       char spt_action_xpath[XPATH_MAXLEN];
+       char spt_plist_xpath[XPATH_MAXLEN + 40];
+       char spt_action_xpath[XPATH_MAXLEN + 26];
 
        snprintf(spt_plist_xpath, sizeof(spt_plist_xpath),
                 "%s/spt-switchover/spt-infinity-prefix-list", VTY_CURR_XPATH);
@@ -522,7 +522,7 @@ int pim_process_no_rp_cmd(struct vty *vty, const char *rp_str,
                          const char *group_str)
 {
        char group_xpath[XPATH_MAXLEN];
-       char rp_xpath[XPATH_MAXLEN];
+       char rp_xpath[XPATH_MAXLEN + 47];
        int printed;
        const struct lyd_node *group_dnode;
 
@@ -568,8 +568,8 @@ int pim_process_rp_plist_cmd(struct vty *vty, const char *rp_str,
 int pim_process_no_rp_plist_cmd(struct vty *vty, const char *rp_str,
                                const char *prefix_list)
 {
-       char rp_xpath[XPATH_MAXLEN];
-       char plist_xpath[XPATH_MAXLEN];
+       char rp_xpath[XPATH_MAXLEN + 47];
+       char plist_xpath[XPATH_MAXLEN + 1070];
        const struct lyd_node *plist_dnode;
        const char *plist;