summaryrefslogtreecommitdiff
path: root/pimd/pim_instance.c
diff options
context:
space:
mode:
authorQuentin Young <qlyoung@cumulusnetworks.com>2020-04-20 14:12:38 -0400
committerQuentin Young <qlyoung@cumulusnetworks.com>2020-04-20 19:14:33 -0400
commit772270f3b6a37a2dd9432541cce436e9b45bb6b9 (patch)
treefc7f717a60d056b0300fcf43373a1fff30b94b13 /pimd/pim_instance.c
parent3f0cc3ffb3ebbc67ebdc285b8093783ad572fa93 (diff)
*: sprintf -> snprintf
Replace sprintf with snprintf where straightforward to do so. - sprintf's into local scope buffers of known size are replaced with the equivalent snprintf call - snprintf's into local scope buffers of known size that use the buffer size expression now use sizeof(buffer) - sprintf(buf + strlen(buf), ...) replaced with snprintf() into temp buffer followed by strlcat Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Diffstat (limited to 'pimd/pim_instance.c')
-rw-r--r--pimd/pim_instance.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/pimd/pim_instance.c b/pimd/pim_instance.c
index b4c2dd28cc..b7e49078ef 100644
--- a/pimd/pim_instance.c
+++ b/pimd/pim_instance.c
@@ -99,7 +99,7 @@ static struct pim_instance *pim_instance_init(struct vrf *vrf)
pim_msdp_init(pim, router->master);
pim_vxlan_init(pim);
- snprintf(hash_name, 64, "PIM %s RPF Hash", vrf->name);
+ snprintf(hash_name, sizeof(hash_name), "PIM %s RPF Hash", vrf->name);
pim->rpf_hash = hash_create_size(256, pim_rpf_hash_key, pim_rpf_equal,
hash_name);