pimd: fix SA reports

Fix a couple of SA warnings introduced recently; replace some
'strcpy' calls.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
This commit is contained in:
Mark Stapp 2020-02-20 08:41:57 -05:00
parent f294fac22d
commit ac74a3f266
2 changed files with 16 additions and 16 deletions

View File

@ -4779,11 +4779,11 @@ static void pim_show_mlag_up_entry_detail(struct vrf *vrf,
own_str[0] = '\0';
if (pim_up_mlag_is_local(up))
strcpy(own_str + strlen(own_str), "L");
strlcat(own_str, "L", sizeof(own_str));
if (up->flags & (PIM_UPSTREAM_FLAG_MASK_MLAG_PEER))
strcpy(own_str + strlen(own_str), "P");
strlcat(own_str, "P", sizeof(own_str));
if (up->flags & (PIM_UPSTREAM_FLAG_MASK_MLAG_INTERFACE))
strcpy(own_str + strlen(own_str), "I");
strlcat(own_str, "I", sizeof(own_str));
/* XXX - fixup, print paragraph output */
vty_out(vty,
"%-15s %-15s %-6s %-11u %-10d %2s\n",
@ -4907,11 +4907,11 @@ static void pim_show_mlag_up_vrf(struct vrf *vrf, struct vty *vty, bool uj)
own_str[0] = '\0';
if (pim_up_mlag_is_local(up))
strcpy(own_str + strlen(own_str), "L");
strlcat(own_str, "L", sizeof(own_str));
if (up->flags & (PIM_UPSTREAM_FLAG_MASK_MLAG_PEER))
strcpy(own_str + strlen(own_str), "P");
strlcat(own_str, "P", sizeof(own_str));
if (up->flags & (PIM_UPSTREAM_FLAG_MASK_MLAG_INTERFACE))
strcpy(own_str + strlen(own_str), "I");
strlcat(own_str, "I", sizeof(own_str));
vty_out(vty,
"%-15s %-15s %-6s %-11u %-10u %2s\n",
src_str, grp_str, own_str,
@ -4972,7 +4972,7 @@ DEFUN(show_ip_pim_mlag_up, show_ip_pim_mlag_up_cmd,
pim_show_mlag_help_string(vty, uj);
if (src_or_group || group)
if (src_or_group)
pim_show_mlag_up_detail(vrf, vty, src_or_group, group, uj);
else
pim_show_mlag_up_vrf(vrf, vty, uj);

View File

@ -1117,7 +1117,7 @@ void pim_vxlan_add_term_dev(struct pim_instance *pim,
* vxlan termination device
*/
pim_if_create_pimreg(pim);
pim_ifp = pim_if_new(ifp, false /*igmp*/, true /*pim*/,
(void)pim_if_new(ifp, false /*igmp*/, true /*pim*/,
false /*pimreg*/, true /*vxlan_term*/);
}
}