Skip to content

Commit

Permalink
pimd: fix compile warnings
Browse files Browse the repository at this point in the history
Signed-off-by: Jafar Al-Gharaibeh <[email protected]>
  • Loading branch information
Jafaral committed Jul 22, 2024
1 parent f2d5bf7 commit 1e8505d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
14 changes: 7 additions & 7 deletions pimd/pim_cmd.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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. */
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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),
Expand All @@ -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];
Expand Down
10 changes: 5 additions & 5 deletions pimd/pim_cmd_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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;

Expand Down Expand Up @@ -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;

Expand Down

0 comments on commit 1e8505d

Please sign in to comment.