summaryrefslogtreecommitdiffstats
path: root/isisd
diff options
context:
space:
mode:
authorCarmine Scarpitta <cscarpit@cisco.com>2023-11-03 13:20:29 +0100
committerCarmine Scarpitta <cscarpit@cisco.com>2023-11-03 13:20:29 +0100
commitccd82b34714dfbbb11c51a9768366bac9750c894 (patch)
tree4191141c6c71640fcea20371e2cec6f50c9bccae /isisd
parentisisd: Fix openfabric crash (diff)
downloadfrr-ccd82b34714dfbbb11c51a9768366bac9750c894.tar.xz
frr-ccd82b34714dfbbb11c51a9768366bac9750c894.zip
isisd: Fix style warnings reported by CI
Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
Diffstat (limited to 'isisd')
-rw-r--r--isisd/isis_srv6.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/isisd/isis_srv6.c b/isisd/isis_srv6.c
index e3432624b..1b0c70694 100644
--- a/isisd/isis_srv6.c
+++ b/isisd/isis_srv6.c
@@ -183,7 +183,7 @@ void isis_srv6_interface_set(struct isis_area *area, const char *ifname)
isis_zebra_srv6_sid_uninstall(area, sid);
}
- strncpy(area->srv6db.config.srv6_ifname, ifname, IF_NAMESIZE - 1);
+ strlcpy(area->srv6db.config.srv6_ifname, ifname, sizeof(area->srv6db.config.srv6_ifname));
if (!if_lookup_by_name(area->srv6db.config.srv6_ifname, VRF_DEFAULT)) {
sr_debug("Interface %s not yet exist in data plane, deferring SIDs installation until it's created", area->srv6db.config.srv6_ifname);
@@ -789,7 +789,7 @@ void isis_srv6_area_init(struct isis_area *area)
ISIS_SRV6);
srv6db->config.max_end_d_msd =
yang_get_default_uint8("%s/msd/node-msd/max-end-d", ISIS_SRV6);
- strncpy(srv6db->config.srv6_ifname, yang_get_default_string("%s/interface", ISIS_SRV6), IF_NAMESIZE - 1);
+ strlcpy(srv6db->config.srv6_ifname, yang_get_default_string("%s/interface", ISIS_SRV6), sizeof(srv6db->config.srv6_ifname));
#else
srv6db->config.enabled = false;
srv6db->config.max_seg_left_msd = ISIS_DEFAULT_SRV6_MAX_SEG_LEFT_MSD;