summaryrefslogtreecommitdiffstats
path: root/ospfd
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2020-11-10 17:23:02 +0100
committerGitHub <noreply@github.com>2020-11-10 17:23:02 +0100
commit42e122614b926405783e3e2c427f63d64ea36706 (patch)
tree56a0de50397ea1d45d5e15ebd77d0c27f5aa9439 /ospfd
parentMerge pull request #7445 from ranjanyash54/dev_4 (diff)
parent* : clean up format specifiers for gcc-10 (diff)
downloadfrr-42e122614b926405783e3e2c427f63d64ea36706.tar.xz
frr-42e122614b926405783e3e2c427f63d64ea36706.zip
Merge pull request #7448 from mjstapp/fix_gcc10_formats
* : clean up format specifiers for gcc-10
Diffstat (limited to 'ospfd')
-rw-r--r--ospfd/ospf_gr_helper.c16
-rw-r--r--ospfd/ospf_opaque.h2
2 files changed, 9 insertions, 9 deletions
diff --git a/ospfd/ospf_gr_helper.c b/ospfd/ospf_gr_helper.c
index 9c029a49b..a86e1b840 100644
--- a/ospfd/ospf_gr_helper.c
+++ b/ospfd/ospf_gr_helper.c
@@ -251,7 +251,7 @@ static int ospf_extract_grace_lsa_fields(struct ospf_lsa *lsa,
/* Check TLV len against overall LSA */
if (sum + TLV_SIZE(tlvh) > length) {
if (IS_DEBUG_OSPF_GR_HELPER)
- zlog_debug("%s: Malformed packet: Invalid TLV len:%zu",
+ zlog_debug("%s: Malformed packet: Invalid TLV len:%u",
__func__, TLV_SIZE(tlvh));
return OSPF_GR_FAILURE;
}
@@ -260,7 +260,7 @@ static int ospf_extract_grace_lsa_fields(struct ospf_lsa *lsa,
case GRACE_PERIOD_TYPE:
if (TLV_SIZE(tlvh) <
sizeof(struct grace_tlv_graceperiod)) {
- zlog_debug("%s: Malformed packet: Invalid grace TLV len:%zu",
+ zlog_debug("%s: Malformed packet: Invalid grace TLV len:%u",
__func__, TLV_SIZE(tlvh));
return OSPF_GR_FAILURE;
}
@@ -277,7 +277,7 @@ static int ospf_extract_grace_lsa_fields(struct ospf_lsa *lsa,
case RESTART_REASON_TYPE:
if (TLV_SIZE(tlvh) <
sizeof(struct grace_tlv_restart_reason)) {
- zlog_debug("%s: Malformed packet: Invalid reason TLV len:%zu",
+ zlog_debug("%s: Malformed packet: Invalid reason TLV len:%u",
__func__, TLV_SIZE(tlvh));
return OSPF_GR_FAILURE;
}
@@ -292,7 +292,7 @@ static int ospf_extract_grace_lsa_fields(struct ospf_lsa *lsa,
case RESTARTER_IP_ADDR_TYPE:
if (TLV_SIZE(tlvh) <
sizeof(struct grace_tlv_restart_addr)) {
- zlog_debug("%s: Malformed packet: Invalid addr TLV len:%zu",
+ zlog_debug("%s: Malformed packet: Invalid addr TLV len:%u",
__func__, TLV_SIZE(tlvh));
return OSPF_GR_FAILURE;
}
@@ -1018,7 +1018,7 @@ static void show_ospf_grace_lsa_info(struct vty *vty, struct ospf_lsa *lsa)
tlvh = TLV_HDR_NEXT(tlvh)) {
/* Check TLV len */
if (sum + TLV_SIZE(tlvh) > length) {
- vty_out(vty, "%% Invalid TLV length: %zu\n",
+ vty_out(vty, "%% Invalid TLV length: %u\n",
TLV_SIZE(tlvh));
return;
}
@@ -1028,7 +1028,7 @@ static void show_ospf_grace_lsa_info(struct vty *vty, struct ospf_lsa *lsa)
if (TLV_SIZE(tlvh) <
sizeof(struct grace_tlv_graceperiod)) {
vty_out(vty,
- "%% Invalid grace TLV length %zu\n",
+ "%% Invalid grace TLV length %u\n",
TLV_SIZE(tlvh));
return;
}
@@ -1043,7 +1043,7 @@ static void show_ospf_grace_lsa_info(struct vty *vty, struct ospf_lsa *lsa)
if (TLV_SIZE(tlvh) <
sizeof(struct grace_tlv_restart_reason)) {
vty_out(vty,
- "%% Invalid reason TLV length %zu\n",
+ "%% Invalid reason TLV length %u\n",
TLV_SIZE(tlvh));
return;
}
@@ -1058,7 +1058,7 @@ static void show_ospf_grace_lsa_info(struct vty *vty, struct ospf_lsa *lsa)
if (TLV_SIZE(tlvh) <
sizeof(struct grace_tlv_restart_addr)) {
vty_out(vty,
- "%% Invalid addr TLV length %zu\n",
+ "%% Invalid addr TLV length %u\n",
TLV_SIZE(tlvh));
return;
}
diff --git a/ospfd/ospf_opaque.h b/ospfd/ospf_opaque.h
index f02f34c9a..c63b8ebda 100644
--- a/ospfd/ospf_opaque.h
+++ b/ospfd/ospf_opaque.h
@@ -94,7 +94,7 @@ struct tlv_header {
#define TLV_BODY_SIZE(tlvh) (ROUNDUP(ntohs((tlvh)->length), sizeof(uint32_t)))
-#define TLV_SIZE(tlvh) (TLV_HDR_SIZE + TLV_BODY_SIZE(tlvh))
+#define TLV_SIZE(tlvh) (uint32_t)(TLV_HDR_SIZE + TLV_BODY_SIZE(tlvh))
#define TLV_HDR_TOP(lsah) \
(struct tlv_header *)((char *)(lsah) + OSPF_LSA_HEADER_SIZE)