summaryrefslogtreecommitdiff
path: root/vrrpd/vrrp.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2020-07-26 19:05:09 -0400
committerDonald Sharp <sharpd@cumulusnetworks.com>2020-07-26 19:05:09 -0400
commit0b1321e2185a216a4135ad92973e440a1ba3f08e (patch)
treec38cb30677793a3faa34537b7c4d69592734ef5c /vrrpd/vrrp.c
parentced26d3d49360dd9c0a1a275721f652ffcb9f34e (diff)
vrrpd: Make clang 11 happy
Recent changes to remove PRIu... in commit: 6cde4b45528e52819c803de92d10d4be3abddf29 causes clang 11 to be unhappy, with length of field warnings. Modify the offending code to compile properly using that compiler. I've tested against clang 11 and gcc 9.3 Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'vrrpd/vrrp.c')
-rw-r--r--vrrpd/vrrp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/vrrpd/vrrp.c b/vrrpd/vrrp.c
index 3e79cff391..d3f9b0c730 100644
--- a/vrrpd/vrrp.c
+++ b/vrrpd/vrrp.c
@@ -2351,7 +2351,7 @@ int vrrp_config_write_global(struct vty *vty)
if (vd.advertisement_interval != VRRP_DEFAULT_ADVINT && ++writes)
vty_out(vty,
- "vrrp default advertisement-interval %hu\n",
+ "vrrp default advertisement-interval %u\n",
vd.advertisement_interval * CS2MS);
if (vd.preempt_mode != VRRP_DEFAULT_PREEMPT && ++writes)
@@ -2374,7 +2374,7 @@ static unsigned int vrrp_hash_key(const void *arg)
const struct vrrp_vrouter *vr = arg;
char key[IFNAMSIZ + 64];
- snprintf(key, sizeof(key), "%s@%hhu", vr->ifp->name, vr->vrid);
+ snprintf(key, sizeof(key), "%s@%u", vr->ifp->name, vr->vrid);
return string_hash_make(key);
}