diff options
author | David Lamparter <equinox@diac24.net> | 2020-03-27 12:51:47 +0100 |
---|---|---|
committer | David Lamparter <equinox@diac24.net> | 2020-07-14 10:43:40 +0200 |
commit | 6cde4b45528e52819c803de92d10d4be3abddf29 (patch) | |
tree | 745ba8e073b939160c79a55b36d538100811d660 /isisd | |
parent | *: un-split strings across lines (diff) | |
download | frr-6cde4b45528e52819c803de92d10d4be3abddf29.tar.xz frr-6cde4b45528e52819c803de92d10d4be3abddf29.zip |
*: remove PRI[udx](8|16|32)
These are completely pointless and break coccinelle string replacements.
Scripted commit, idempotent to running:
```
python3 tools/stringmangle.py --pri8-16-32 `git ls-files | egrep '\.[ch]$'`
```
Signed-off-by: David Lamparter <equinox@diac24.net>
Diffstat (limited to 'isisd')
-rw-r--r-- | isisd/fabricd.c | 12 | ||||
-rw-r--r-- | isisd/isis_lsp.c | 50 | ||||
-rw-r--r-- | isisd/isis_misc.c | 2 | ||||
-rw-r--r-- | isisd/isis_mt.c | 2 | ||||
-rw-r--r-- | isisd/isis_nb_config.c | 11 | ||||
-rw-r--r-- | isisd/isis_pdu.c | 55 | ||||
-rw-r--r-- | isisd/isis_te.c | 15 | ||||
-rw-r--r-- | isisd/isis_tlvs.c | 120 | ||||
-rw-r--r-- | isisd/isisd.c | 2 |
9 files changed, 106 insertions, 163 deletions
diff --git a/isisd/fabricd.c b/isisd/fabricd.c index e13078a7e..e9dfd4601 100644 --- a/isisd/fabricd.c +++ b/isisd/fabricd.c @@ -372,8 +372,7 @@ static uint8_t fabricd_calculate_fabric_tier(struct isis_area *area) return ISIS_TIER_UNDEFINED; } - zlog_info("OpenFabric: Found %s as furthest t0 from local system, dist == %" - PRIu32, rawlspid_print(furthest_t0->N.id), furthest_t0->d_N); + zlog_info("OpenFabric: Found %s as furthest t0 from local system, dist == %u", rawlspid_print(furthest_t0->N.id), furthest_t0->d_N); struct isis_spftree *remote_tree = isis_run_hopcount_spf(area, furthest_t0->N.id, NULL); @@ -386,8 +385,7 @@ static uint8_t fabricd_calculate_fabric_tier(struct isis_area *area) isis_spftree_del(remote_tree); return ISIS_TIER_UNDEFINED; } else { - zlog_info("OpenFabric: Found %s as furthest from remote dist == %" - PRIu32, rawlspid_print(furthest_from_remote->N.id), + zlog_info("OpenFabric: Found %s as furthest from remote dist == %u", rawlspid_print(furthest_from_remote->N.id), furthest_from_remote->d_N); } @@ -423,7 +421,7 @@ static int fabricd_tier_calculation_cb(struct thread *thread) if (tier == ISIS_TIER_UNDEFINED) return 0; - zlog_info("OpenFabric: Got tier %" PRIu8 " from algorithm. Arming timer.", + zlog_info("OpenFabric: Got tier %hhu from algorithm. Arming timer.", tier); f->tier_pending = tier; thread_add_timer(master, fabricd_tier_set_timer, f, @@ -463,7 +461,7 @@ static void fabricd_set_tier(struct fabricd *f, uint8_t tier) if (f->tier == tier) return; - zlog_info("OpenFabric: Set own tier to %" PRIu8, tier); + zlog_info("OpenFabric: Set own tier to %hhu", tier); f->tier = tier; fabricd_bump_tier_calculation_timer(f); @@ -522,7 +520,7 @@ int fabricd_write_settings(struct isis_area *area, struct vty *vty) return written; if (f->tier_config != ISIS_TIER_UNDEFINED) { - vty_out(vty, " fabric-tier %" PRIu8 "\n", f->tier_config); + vty_out(vty, " fabric-tier %hhu\n", f->tier_config); written++; } diff --git a/isisd/isis_lsp.c b/isisd/isis_lsp.c index 30ffaf4a7..bf15163cb 100644 --- a/isisd/isis_lsp.c +++ b/isisd/isis_lsp.c @@ -200,16 +200,12 @@ int lsp_compare(char *areatag, struct isis_lsp *lsp, uint32_t seqno, || (lsp->hdr.rem_lifetime != 0 && rem_lifetime != 0))) { if (IS_DEBUG_SNP_PACKETS) { zlog_debug( - "ISIS-Snp (%s): Compare LSP %s seq 0x%08" PRIx32 - ", cksum 0x%04" PRIx16 ", lifetime %" PRIu16 - "s", + "ISIS-Snp (%s): Compare LSP %s seq 0x%08x, cksum 0x%04hx, lifetime %hus", areatag, rawlspid_print(lsp->hdr.lsp_id), lsp->hdr.seqno, lsp->hdr.checksum, lsp->hdr.rem_lifetime); zlog_debug( - "ISIS-Snp (%s): is equal to ours seq 0x%08" PRIx32 - ", cksum 0x%04" PRIx16 ", lifetime %" PRIu16 - "s", + "ISIS-Snp (%s): is equal to ours seq 0x%08x, cksum 0x%04hx, lifetime %hus", areatag, seqno, checksum, rem_lifetime); } return LSP_EQUAL; @@ -234,28 +230,22 @@ int lsp_compare(char *areatag, struct isis_lsp *lsp, uint32_t seqno, && lsp->hdr.rem_lifetime)))) { if (IS_DEBUG_SNP_PACKETS) { zlog_debug( - "ISIS-Snp (%s): Compare LSP %s seq 0x%08" PRIx32 - ", cksum 0x%04" PRIx16 ", lifetime %" PRIu16 - "s", + "ISIS-Snp (%s): Compare LSP %s seq 0x%08x, cksum 0x%04hx, lifetime %hus", areatag, rawlspid_print(lsp->hdr.lsp_id), seqno, checksum, rem_lifetime); zlog_debug( - "ISIS-Snp (%s): is newer than ours seq 0x%08" PRIx32 - ", cksum 0x%04" PRIx16 ", lifetime %" PRIu16 - "s", + "ISIS-Snp (%s): is newer than ours seq 0x%08x, cksum 0x%04hx, lifetime %hus", areatag, lsp->hdr.seqno, lsp->hdr.checksum, lsp->hdr.rem_lifetime); } return LSP_NEWER; } if (IS_DEBUG_SNP_PACKETS) { - zlog_debug("ISIS-Snp (%s): Compare LSP %s seq 0x%08" PRIx32 - ", cksum 0x%04" PRIx16 ", lifetime %" PRIu16 "s", + zlog_debug("ISIS-Snp (%s): Compare LSP %s seq 0x%08x, cksum 0x%04hx, lifetime %hus", areatag, rawlspid_print(lsp->hdr.lsp_id), seqno, checksum, rem_lifetime); zlog_debug( - "ISIS-Snp (%s): is older than ours seq 0x%08" PRIx32 - ", cksum 0x%04" PRIx16 ", lifetime %" PRIu16 "s", + "ISIS-Snp (%s): is older than ours seq 0x%08x, cksum 0x%04hx, lifetime %hus", areatag, lsp->hdr.seqno, lsp->hdr.checksum, lsp->hdr.rem_lifetime); } @@ -656,15 +646,15 @@ void lsp_print(struct isis_lsp *lsp, struct vty *vty, char dynhost) lspid_print(lsp->hdr.lsp_id, LSPid, dynhost, 1); vty_out(vty, "%-21s%c ", LSPid, lsp->own_lsp ? '*' : ' '); - vty_out(vty, "%5" PRIu16 " ", lsp->hdr.pdu_len); - vty_out(vty, "0x%08" PRIx32 " ", lsp->hdr.seqno); - vty_out(vty, "0x%04" PRIx16 " ", lsp->hdr.checksum); + vty_out(vty, "%5hu ", lsp->hdr.pdu_len); + vty_out(vty, "0x%08x ", lsp->hdr.seqno); + vty_out(vty, "0x%04hx ", lsp->hdr.checksum); if (lsp->hdr.rem_lifetime == 0) { snprintf(age_out, sizeof(age_out), "(%d)", lsp->age_out); age_out[7] = '\0'; vty_out(vty, "%7s ", age_out); } else - vty_out(vty, " %5" PRIu16 " ", lsp->hdr.rem_lifetime); + vty_out(vty, " %5hu ", lsp->hdr.rem_lifetime); vty_out(vty, "%s\n", lsp_bits2string(lsp->hdr.lsp_bits, b, sizeof(b))); } @@ -994,7 +984,7 @@ static void lsp_build(struct isis_lsp *lsp, struct isis_area *area) if (fabricd) { lsp_debug( - "ISIS (%s): Adding tier %" PRIu8 " spine-leaf-extension tlv.", + "ISIS (%s): Adding tier %hhu spine-leaf-extension tlv.", area->area_tag, fabricd_tier(area)); isis_tlvs_add_spine_leaf(lsp->tlvs, fabricd_tier(area), true, false, false, false); @@ -1256,9 +1246,7 @@ int lsp_generate(struct isis_area *area, int level) &area->t_lsp_refresh[level - 1]); if (IS_DEBUG_UPDATE_PACKETS) { - zlog_debug("ISIS-Upd (%s): Building L%d LSP %s, len %" PRIu16 - ", seq 0x%08" PRIx32 ", cksum 0x%04" PRIx16 - ", lifetime %" PRIu16 "s refresh %" PRIu16 "s", + zlog_debug("ISIS-Upd (%s): Building L%d LSP %s, len %hu, seq 0x%08x, cksum 0x%04hx, lifetime %hus refresh %hus", area->area_tag, level, rawlspid_print(newlsp->hdr.lsp_id), newlsp->hdr.pdu_len, newlsp->hdr.seqno, @@ -1341,9 +1329,7 @@ static int lsp_regenerate(struct isis_area *area, int level) if (IS_DEBUG_UPDATE_PACKETS) { zlog_debug( - "ISIS-Upd (%s): Refreshed our L%d LSP %s, len %" PRIu16 - ", seq 0x%08" PRIx32 ", cksum 0x%04" PRIx16 - ", lifetime %" PRIu16 "s refresh %" PRIu16 "s", + "ISIS-Upd (%s): Refreshed our L%d LSP %s, len %hu, seq 0x%08x, cksum 0x%04hx, lifetime %hus refresh %hus", area->area_tag, level, rawlspid_print(lsp->hdr.lsp_id), lsp->hdr.pdu_len, lsp->hdr.seqno, lsp->hdr.checksum, lsp->hdr.rem_lifetime, refresh_time); @@ -1654,9 +1640,7 @@ int lsp_generate_pseudo(struct isis_circuit *circuit, int level) if (IS_DEBUG_UPDATE_PACKETS) { zlog_debug( - "ISIS-Upd (%s): Built L%d Pseudo LSP %s, len %" PRIu16 - ", seq 0x%08" PRIx32 ", cksum 0x%04" PRIx16 - ", lifetime %" PRIu16 "s, refresh %" PRIu16 "s", + "ISIS-Upd (%s): Built L%d Pseudo LSP %s, len %hu, seq 0x%08x, cksum 0x%04hx, lifetime %hus, refresh %hus", circuit->area->area_tag, level, rawlspid_print(lsp->hdr.lsp_id), lsp->hdr.pdu_len, lsp->hdr.seqno, lsp->hdr.checksum, @@ -1711,9 +1695,7 @@ static int lsp_regenerate_pseudo(struct isis_circuit *circuit, int level) if (IS_DEBUG_UPDATE_PACKETS) { zlog_debug( - "ISIS-Upd (%s): Refreshed L%d Pseudo LSP %s, len %" PRIu16 - ", seq 0x%08" PRIx32 ", cksum 0x%04" PRIx16 - ", lifetime %" PRIu16 "s, refresh %" PRIu16 "s", + "ISIS-Upd (%s): Refreshed L%d Pseudo LSP %s, len %hu, seq 0x%08x, cksum 0x%04hx, lifetime %hus, refresh %hus", circuit->area->area_tag, level, rawlspid_print(lsp->hdr.lsp_id), lsp->hdr.pdu_len, lsp->hdr.seqno, lsp->hdr.checksum, @@ -1926,7 +1908,7 @@ int lsp_tick(struct thread *thread) if (lsp->age_out == 0) { zlog_debug( - "ISIS-Upd (%s): L%u LSP %s seq 0x%08" PRIx32 " aged out", + "ISIS-Upd (%s): L%u LSP %s seq 0x%08x aged out", area->area_tag, lsp->level, rawlspid_print(lsp->hdr.lsp_id), lsp->hdr.seqno); diff --git a/isisd/isis_misc.c b/isisd/isis_misc.c index 27d06e8da..86725173c 100644 --- a/isisd/isis_misc.c +++ b/isisd/isis_misc.c @@ -190,7 +190,7 @@ const char *nlpid2str(uint8_t nlpid) case NLPID_ESIS: return "ES-IS"; default: - snprintf(buf, sizeof(buf), "%" PRIu8, nlpid); + snprintf(buf, sizeof(buf), "%hhu", nlpid); return buf; } } diff --git a/isisd/isis_mt.c b/isisd/isis_mt.c index 5c262049a..9465c5e75 100644 --- a/isisd/isis_mt.c +++ b/isisd/isis_mt.c @@ -72,7 +72,7 @@ const char *isis_mtid2str(uint16_t mtid) case ISIS_MT_IPV6_DSTSRC: return "ipv6-dstsrc"; default: - snprintf(buf, sizeof(buf), "%" PRIu16, mtid); + snprintf(buf, sizeof(buf), "%hu", mtid); return buf; } } diff --git a/isisd/isis_nb_config.c b/isisd/isis_nb_config.c index c17433cb2..5fad974d2 100644 --- a/isisd/isis_nb_config.c +++ b/isisd/isis_nb_config.c @@ -1503,7 +1503,7 @@ int isis_instance_segment_routing_srgb_lower_bound_modify( switch (args->event) { case NB_EV_VALIDATE: if (!IS_MPLS_UNRESERVED_LABEL(lower_bound)) { - zlog_warn("Invalid SRGB lower bound: %" PRIu32, + zlog_warn("Invalid SRGB lower bound: %u", lower_bound); return NB_ERR_VALIDATION; } @@ -1528,7 +1528,7 @@ int isis_instance_segment_routing_srgb_upper_bound_modify( switch (args->event) { case NB_EV_VALIDATE: if (!IS_MPLS_UNRESERVED_LABEL(upper_bound)) { - zlog_warn("Invalid SRGB upper bound: %" PRIu32, + zlog_warn("Invalid SRGB upper bound: %u", upper_bound); return NB_ERR_VALIDATION; } @@ -1601,7 +1601,7 @@ int isis_instance_segment_routing_srlb_lower_bound_modify( switch (args->event) { case NB_EV_VALIDATE: if (!IS_MPLS_UNRESERVED_LABEL(lower_bound)) { - zlog_warn("Invalid SRLB lower bound: %" PRIu32, + zlog_warn("Invalid SRLB lower bound: %u", lower_bound); return NB_ERR_VALIDATION; } @@ -1626,7 +1626,7 @@ int isis_instance_segment_routing_srlb_upper_bound_modify( switch (args->event) { case NB_EV_VALIDATE: if (!IS_MPLS_UNRESERVED_LABEL(upper_bound)) { - zlog_warn("Invalid SRLB upper bound: %" PRIu32, + zlog_warn("Invalid SRLB upper bound: %u", upper_bound); return NB_ERR_VALIDATION; } @@ -1854,8 +1854,7 @@ int lib_interface_isis_create(struct nb_cb_create_args *args) #endif /* ifndef FABRICD */ if (actual_mtu < min_mtu) { snprintf(args->errmsg, args->errmsg_len, - "Interface %s has MTU %" PRIu32 - ", minimum MTU for the area is %" PRIu32 "", + "Interface %s has MTU %u, minimum MTU for the area is %u", ifp->name, actual_mtu, min_mtu); return NB_ERR_VALIDATION; } diff --git a/isisd/isis_pdu.c b/isisd/isis_pdu.c index b886f98ca..9a1ad38f8 100644 --- a/isisd/isis_pdu.c +++ b/isisd/isis_pdu.c @@ -427,7 +427,7 @@ static int process_p2p_hello(struct iih_info *iih) if (IS_DEBUG_ADJ_PACKETS) { zlog_debug( - "ISIS-Adj (%s): Rcvd P2P IIH from (%s), cir type %s, cir id %hhu, length %" PRIu16, + "ISIS-Adj (%s): Rcvd P2P IIH from (%s), cir type %s, cir id %hhu, length %hu", iih->circuit->area->area_tag, iih->circuit->interface->name, circuit_t2string(iih->circuit->is_type), @@ -646,7 +646,7 @@ static int process_hello(uint8_t pdu_type, struct isis_circuit *circuit, if (pdu_len_validate(iih.pdu_len, circuit)) { zlog_warn( - "ISIS-Adj (%s): Rcvd %s from (%s) with invalid pdu length %" PRIu16, + "ISIS-Adj (%s): Rcvd %s from (%s) with invalid pdu length %hu", circuit->area->area_tag, pdu_name, circuit->interface->name, iih.pdu_len); circuit->rej_adjacencies++; @@ -859,16 +859,14 @@ static int process_lsp(uint8_t pdu_type, struct isis_circuit *circuit, #endif /* ifndef FABRICD */ if (pdu_len_validate(hdr.pdu_len, circuit)) { - zlog_debug("ISIS-Upd (%s): LSP %s invalid LSP length %" PRIu16, + zlog_debug("ISIS-Upd (%s): LSP %s invalid LSP length %hu", circuit->area->area_tag, rawlspid_print(hdr.lsp_id), hdr.pdu_len); return ISIS_WARNING; } if (IS_DEBUG_UPDATE_PACKETS) { - zlog_debug("ISIS-Upd (%s): Rcvd L%d LSP %s, seq 0x%08" PRIx32 - ", cksum 0x%04" PRIx16 ", lifetime %" PRIu16 - "s, len %" PRIu16 ", on %s", + zlog_debug("ISIS-Upd (%s): Rcvd L%d LSP %s, seq 0x%08x, cksum 0x%04hx, lifetime %hus, len %hu, on %s", circuit->area->area_tag, level, rawlspid_print(hdr.lsp_id), hdr.seqno, hdr.checksum, hdr.rem_lifetime, hdr.pdu_len, @@ -878,7 +876,7 @@ static int process_lsp(uint8_t pdu_type, struct isis_circuit *circuit, /* lsp is_type check */ if ((hdr.lsp_bits & IS_LEVEL_1) != IS_LEVEL_1) { zlog_debug( - "ISIS-Upd (%s): LSP %s invalid LSP is type 0x%" PRIx8, + "ISIS-Upd (%s): LSP %s invalid LSP is type 0x%hhx", circuit->area->area_tag, rawlspid_print(hdr.lsp_id), hdr.lsp_bits & IS_LEVEL_1_AND_2); /* continue as per RFC1122 Be liberal in what you accept, and @@ -890,7 +888,7 @@ static int process_lsp(uint8_t pdu_type, struct isis_circuit *circuit, if (iso_csum_verify(STREAM_DATA(circuit->rcv_stream) + 12, hdr.pdu_len - 12, hdr.checksum, 12)) { zlog_debug( - "ISIS-Upd (%s): LSP %s invalid LSP checksum 0x%04" PRIx16, + "ISIS-Upd (%s): LSP %s invalid LSP checksum 0x%04hx", circuit->area->area_tag, rawlspid_print(hdr.lsp_id), hdr.checksum); return ISIS_WARNING; @@ -983,9 +981,7 @@ static int process_lsp(uint8_t pdu_type, struct isis_circuit *circuit, if (circuit->circ_type == CIRCUIT_T_BROADCAST) { if (!isis_adj_lookup_snpa(ssnpa, circuit->u.bc.adjdb[level - 1])) { - zlog_debug("(%s): DS ======= LSP %s, seq 0x%08" PRIx32 - ", cksum 0x%04" PRIx16 ", lifetime %" PRIu16 - "s on %s", + zlog_debug("(%s): DS ======= LSP %s, seq 0x%08x, cksum 0x%04hx, lifetime %hus on %s", circuit->area->area_tag, rawlspid_print(hdr.lsp_id), hdr.seqno, hdr.checksum, hdr.rem_lifetime, @@ -1026,8 +1022,7 @@ dontcheckadj: if (lsp && (lsp->hdr.seqno == hdr.seqno) && (lsp->hdr.checksum != hdr.checksum) && hdr.rem_lifetime) { - zlog_warn("ISIS-Upd (%s): LSP %s seq 0x%08" PRIx32 - " with confused checksum received.", + zlog_warn("ISIS-Upd (%s): LSP %s seq 0x%08x with confused checksum received.", circuit->area->area_tag, rawlspid_print(hdr.lsp_id), hdr.seqno); hdr.rem_lifetime = 0; @@ -1122,7 +1117,7 @@ dontcheckadj: } if (IS_DEBUG_UPDATE_PACKETS) zlog_debug( - "ISIS-Upd (%s): (1) re-originating LSP %s new seq 0x%08" PRIx32, + "ISIS-Upd (%s): (1) re-originating LSP %s new seq 0x%08x", circuit->area->area_tag, rawlspid_print(hdr.lsp_id), lsp->hdr.seqno); @@ -1164,7 +1159,7 @@ dontcheckadj: #endif /* ifndef FABRICD */ if (IS_DEBUG_UPDATE_PACKETS) { zlog_debug( - "ISIS-Upd (%s): (2) re-originating LSP %s new seq 0x%08" PRIx32, + "ISIS-Upd (%s): (2) re-originating LSP %s new seq 0x%08x", circuit->area->area_tag, rawlspid_print(hdr.lsp_id), lsp->hdr.seqno); @@ -1411,8 +1406,7 @@ static int process_snp(uint8_t pdu_type, struct isis_circuit *circuit, for (struct isis_lsp_entry *entry = entry_head; entry; entry = entry->next) { zlog_debug( - "ISIS-Snp (%s): %cSNP entry %s, seq 0x%08" PRIx32 - ", cksum 0x%04" PRIx16 ", lifetime %" PRIu16 "s", + "ISIS-Snp (%s): %cSNP entry %s, seq 0x%08x, cksum 0x%04hx, lifetime %hus", circuit->area->area_tag, typechar, rawlspid_print(entry->id), entry->seqno, entry->checksum, entry->rem_lifetime); @@ -1605,18 +1599,18 @@ int isis_handle_pdu(struct isis_circuit *circuit, uint8_t *ssnpa) if (idrp == ISO9542_ESIS) { flog_err(EC_LIB_DEVELOPMENT, - "No support for ES-IS packet IDRP=%" PRIx8, idrp); + "No support for ES-IS packet IDRP=%hhx", idrp); return ISIS_ERROR; } if (idrp != ISO10589_ISIS) { - flog_err(EC_ISIS_PACKET, "Not an IS-IS packet IDRP=%" PRIx8, + flog_err(EC_ISIS_PACKET, "Not an IS-IS packet IDRP=%hhx", idrp); return ISIS_ERROR; } if (version1 != 1) { - zlog_warn("Unsupported ISIS version %" PRIu8, version1); + zlog_warn("Unsupported ISIS version %hhu", version1); #ifndef FABRICD /* send northbound notification */ isis_notif_version_skew(circuit, version1, raw_pdu); @@ -1627,8 +1621,7 @@ int isis_handle_pdu(struct isis_circuit *circuit, uint8_t *ssnpa) if (id_len != 0 && id_len != ISIS_SYS_ID_LEN) { flog_err( EC_ISIS_PACKET, - "IDFieldLengthMismatch: ID Length field in a received PDU %" PRIu8 - ", while the parameter for this IS is %u", + "IDFieldLengthMismatch: ID Length field in a received PDU %hhu, while the parameter for this IS is %u", id_len, ISIS_SYS_ID_LEN); circuit->id_len_mismatches++; #ifndef FABRICD @@ -1640,14 +1633,13 @@ int isis_handle_pdu(struct isis_circuit *circuit, uint8_t *ssnpa) uint8_t expected_length; if (pdu_size(pdu_type, &expected_length)) { - zlog_warn("Unsupported ISIS PDU %" PRIu8, pdu_type); + zlog_warn("Unsupported ISIS PDU %hhu", pdu_type); return ISIS_WARNING; } if (length != expected_length) { flog_err(EC_ISIS_PACKET, - "Expected fixed header length = %" PRIu8 - " but got %" PRIu8, + "Expected fixed header length = %hhu but got %hhu", expected_length, length); return ISIS_ERROR; } @@ -1660,7 +1652,7 @@ int isis_handle_pdu(struct isis_circuit *circuit, uint8_t *ssnpa) } if (version2 != 1) { - zlog_warn("Unsupported ISIS PDU version %" PRIu8, version2); + zlog_warn("Unsupported ISIS PDU version %hhu", version2); #ifndef FABRICD /* send northbound notification */ isis_notif_version_skew(circuit, version2, raw_pdu); @@ -1680,8 +1672,7 @@ int isis_handle_pdu(struct isis_circuit *circuit, uint8_t *ssnpa) && max_area_addrs != isis->max_area_addrs) { flog_err( EC_ISIS_PACKET, - "maximumAreaAddressesMismatch: maximumAreaAdresses in a received PDU %" PRIu8 - " while the parameter for this IS is %u", + "maximumAreaAddressesMismatch: maximumAreaAdresses in a received PDU %hhu while the parameter for this IS is %u", max_area_addrs, isis->max_area_addrs); circuit->max_area_addr_mismatches++; #ifndef FABRICD @@ -2401,9 +2392,7 @@ void send_lsp(struct isis_circuit *circuit, struct isis_lsp *lsp, if (stream_get_endp(lsp->pdu) > stream_get_size(circuit->snd_stream)) { flog_err( EC_ISIS_PACKET, - "ISIS-Upd (%s): Can't send L%d LSP %s, seq 0x%08" PRIx32 - ", cksum 0x%04" PRIx16 ", lifetime %" PRIu16 - "s on %s. LSP Size is %zu while interface stream size is %zu.", + "ISIS-Upd (%s): Can't send L%d LSP %s, seq 0x%08x, cksum 0x%04hx, lifetime %hus on %s. LSP Size is %zu while interface stream size is %zu.", circuit->area->area_tag, lsp->level, rawlspid_print(lsp->hdr.lsp_id), lsp->hdr.seqno, lsp->hdr.checksum, lsp->hdr.rem_lifetime, @@ -2431,9 +2420,7 @@ void send_lsp(struct isis_circuit *circuit, struct isis_lsp *lsp, } if (IS_DEBUG_UPDATE_PACKETS) { - zlog_debug("ISIS-Upd (%s): Sending %sL%d LSP %s, seq 0x%08" PRIx32 - ", cksum 0x%04" PRIx16 ", lifetime %" PRIu16 - "s on %s", + zlog_debug("ISIS-Upd (%s): Sending %sL%d LSP %s, seq 0x%08x, cksum 0x%04hx, lifetime %hus on %s", circuit->area->area_tag, (tx_type == TX_LSP_CIRCUIT_SCOPED) ? "Circuit scoped " : "", diff --git a/isisd/isis_te.c b/isisd/isis_te.c index 133707d61..a599909eb 100644 --- a/isisd/isis_te.c +++ b/isisd/isis_te.c @@ -351,12 +351,12 @@ static void show_ext_sub(struct vty *vty, char *name, sbuf_reset(&buf); if (IS_SUBTLV(ext, EXT_ADM_GRP)) - sbuf_push(&buf, 4, "Administrative Group: 0x%" PRIx32 "\n", + sbuf_push(&buf, 4, "Administrative Group: 0x%x\n", ext->adm_group); if (IS_SUBTLV(ext, EXT_LLRI)) { - sbuf_push(&buf, 4, "Link Local ID: %" PRIu32 "\n", + sbuf_push(&buf, 4, "Link Local ID: %u\n", ext->local_llri); - sbuf_push(&buf, 4, "Link Remote ID: %" PRIu32 "\n", + sbuf_push(&buf, 4, "Link Remote ID: %u\n", ext->remote_llri); } if (IS_SUBTLV(ext, EXT_LOCAL_ADDR)) @@ -394,7 +394,7 @@ static void show_ext_sub(struct vty *vty, char *name, ext->te_metric); if (IS_SUBTLV(ext, EXT_RMT_AS)) sbuf_push(&buf, 4, - "Inter-AS TE Remote AS number: %" PRIu32 "\n", + "Inter-AS TE Remote AS number: %u\n", ext->remote_as); if (IS_SUBTLV(ext, EXT_RMT_IP)) sbuf_push(&buf, 4, @@ -402,19 +402,18 @@ static void show_ext_sub(struct vty *vty, char *name, inet_ntoa(ext->remote_ip)); if (IS_SUBTLV(ext, EXT_DELAY)) sbuf_push(&buf, 4, - "%s Average Link Delay: %" PRIu32 " (micro-sec)\n", + "%s Average Link Delay: %u (micro-sec)\n", IS_ANORMAL(ext->delay) ? "Anomalous" : "Normal", ext->delay); if (IS_SUBTLV(ext, EXT_MM_DELAY)) { - sbuf_push(&buf, 4, "%s Min/Max Link Delay: %" PRIu32 " / %" - PRIu32 " (micro-sec)\n", + sbuf_push(&buf, 4, "%s Min/Max Link Delay: %u / %u (micro-sec)\n", IS_ANORMAL(ext->min_delay) ? "Anomalous" : "Normal", ext->min_delay & TE_EXT_MASK, ext->max_delay & TE_EXT_MASK); } if (IS_SUBTLV(ext, EXT_DELAY_VAR)) sbuf_push(&buf, 4, - "Delay Variation: %" PRIu32 " (micro-sec)\n", + "Delay Variation: %u (micro-sec)\n", ext->delay_var & TE_EXT_MASK); if (IS_SUBTLV(ext, EXT_PKT_LOSS)) sbuf_push(&buf, 4, "%s Link Packet Loss: %g (%%)\n", diff --git a/isisd/isis_tlvs.c b/isisd/isis_tlvs.c index 3f5e41414..e9b28489c 100644 --- a/isisd/isis_tlvs.c +++ b/isisd/isis_tlvs.c @@ -200,12 +200,12 @@ static void format_item_ext_subtlvs(struct isis_ext_subtlvs *exts, /* Standard metrics */ if (IS_SUBTLV(exts, EXT_ADM_GRP)) - sbuf_push(buf, indent, "Administrative Group: 0x%" PRIx32 "\n", + sbuf_push(buf, indent, "Administrative Group: 0x%x\n", exts->adm_group); if (IS_SUBTLV(exts, EXT_LLRI)) { - sbuf_push(buf, indent, "Link Local ID: %" PRIu32 "\n", + sbuf_push(buf, indent, "Link Local ID: %u\n", exts->local_llri); - sbuf_push(buf, indent, "Link Remote ID: %" PRIu32 "\n", + sbuf_push(buf, indent, "Link Remote ID: %u\n", exts->remote_llri); } if (IS_SUBTLV(exts, EXT_LOCAL_ADDR)) @@ -243,7 +243,7 @@ static void format_item_ext_subtlvs(struct isis_ext_subtlvs *exts, exts->te_metric); if (IS_SUBTLV(exts, EXT_RMT_AS)) sbuf_push(buf, indent, - "Inter-AS TE Remote AS number: %" PRIu32 "\n", + "Inter-AS TE Remote AS number: %u\n", exts->remote_as); if (IS_SUBTLV(exts, EXT_RMT_IP)) sbuf_push(buf, indent, @@ -252,19 +252,18 @@ static void format_item_ext_subtlvs(struct isis_ext_subtlvs *exts, /* Extended metrics */ if (IS_SUBTLV(exts, EXT_DELAY)) sbuf_push(buf, indent, - "%s Average Link Delay: %" PRIu32 " (micro-sec)\n", + "%s Average Link Delay: %u (micro-sec)\n", IS_ANORMAL(exts->delay) ? "Anomalous" : "Normal", exts->delay); if (IS_SUBTLV(exts, EXT_MM_DELAY)) { - sbuf_push(buf, indent, "%s Min/Max Link Delay: %" PRIu32 " / %" - PRIu32 " (micro-sec)\n", + sbuf_push(buf, indent, "%s Min/Max Link Delay: %u / %u (micro-sec)\n", IS_ANORMAL(exts->min_delay) ? "Anomalous" : "Normal", exts->min_delay & TE_EXT_MASK, exts->max_delay & TE_EXT_MASK); } if (IS_SUBTLV(exts, EXT_DELAY_VAR)) { sbuf_push(buf, indent, - "Delay Variation: %" PRIu32 " (micro-sec)\n", + "Delay Variation: %u (micro-sec)\n", exts->delay_var & TE_EXT_MASK); } if (IS_SUBTLV(exts, EXT_PKT_LOSS)) @@ -297,8 +296,7 @@ static void format_item_ext_subtlvs(struct isis_ext_subtlvs *exts, continue; sbuf_push( buf, indent, - "Adjacency-SID: %" PRIu32 ", Weight: %" PRIu8 - ", Flags: F:%c B:%c, V:%c, L:%c, S:%c, P:%c\n", + "Adjacency-SID: %u, Weight: %hhu, Flags: F:%c B:%c, V:%c, L:%c, S:%c, P:%c\n", adj->sid, adj->weight, adj->flags & EXT_SUBTLV_LINK_ADJ_SID_FFLG ? '1' : '0', @@ -327,9 +325,7 @@ static void format_item_ext_subtlvs(struct isis_ext_subtlvs *exts, && (lan->family != AF_INET6))) continue; sbuf_push(buf, indent, - "Lan-Adjacency-SID: %" PRIu32 - ", Weight: %" PRIu8 - ", Flags: F:%c B:%c, V:%c, L:%c, S:%c, P:%c\n" + "Lan-Adjacency-SID: %u, Weight: %hhu, Flags: F:%c B:%c, V:%c, L:%c, S:%c, P:%c\n" " Neighbor-ID: %s\n", lan->sid, lan->weight, lan->flags & EXT_SUBTLV_LINK_ADJ_SID_FFLG @@ -542,7 +538,7 @@ static int unpack_item_ext_subtlvs(uint16_t mtid, uint8_t len, struct stream *s, subtlv_type = stream_getc(s); subtlv_len = stream_getc(s); if (subtlv_len > len - sum) { - sbuf_push(log, indent, "TLV %" PRIu8 ": Available data %" PRIu8 " is less than TLV size %u !\n", + sbuf_push(log, indent, "TLV %hhu: Available data %hhu is less than TLV size %u !\n", subtlv_type, len - sum, subtlv_len); return 1; } @@ -812,11 +808,11 @@ static void format_item_prefix_sid(uint16_t mtid, struct isis_item *i, sbuf_push(buf, indent, "SR Prefix-SID "); if (sid->flags & ISIS_PREFIX_SID_VALUE) { - sbuf_push(buf, 0, "Label: %" PRIu32 ", ", sid->value); + sbuf_push(buf, 0, "Label: %u, ", sid->value); } else { - sbuf_push(buf, 0, "Index: %" PRIu32 ", ", sid->value); + sbuf_push(buf, 0, "Index: %u, ", sid->value); } - sbuf_push(buf, 0, "Algorithm: %" PRIu8 ", ", sid->algorithm); + sbuf_push(buf, 0, "Algorithm: %hhu, ", sid->algorithm); sbuf_push(buf, 0, "Flags:%s%s%s%s%s%s\n", sid->flags & ISIS_PREFIX_SID_READVERTISED ? " READVERTISED" : "", @@ -865,7 +861,7 @@ static int unpack_item_prefix_sid(uint16_t mtid, uint8_t len, struct stream *s, if (len < 5) { sbuf_push(log, indent, - "Not enough data left. (expected 5 or more bytes, got %" PRIu8 ")\n", + "Not enough data left. (expected 5 or more bytes, got %hhu)\n", len); return 1; } @@ -884,7 +880,7 @@ static int unpack_item_prefix_sid(uint16_t mtid, uint8_t len, struct stream *s, : ISIS_SUBTLV_PREFIX_SID_SIZE + 1; if (len != expected_size) { sbuf_push(log, indent, - "TLV size differs from expected size. (expected %u but got %" PRIu8 ")\n", + "TLV size differs from expected size. (expected %u but got %hhu)\n", expected_size, len); return 1; } @@ -960,7 +956,7 @@ static int unpack_subtlv_ipv6_source_prefix(enum isis_tlv_context context, if (tlv_len < 1) { sbuf_push(log, indent, - "Not enough data left. (expected 1 or more bytes, got %" PRIu8 ")\n", + "Not enough data left. (expected 1 or more bytes, got %hhu)\n", tlv_len); return 1; } @@ -975,7 +971,7 @@ static int unpack_subtlv_ipv6_source_prefix(enum isis_tlv_context context, if (tlv_len != 1 + PSIZE(p.prefixlen)) { sbuf_push( log, indent, - "TLV size differs from expected size for the prefixlen. (expected %u but got %" PRIu8 ")\n", + "TLV size differs from expected size for the prefixlen. (expected %u but got %hhu)\n", 1 + PSIZE(p.prefixlen), tlv_len); return 1; } @@ -1147,8 +1143,7 @@ static int unpack_item_area_address(uint16_t mtid, uint8_t len, if (len < 1) { sbuf_push( log, indent, - "Not enough data left. (Expected 1 byte of address length, got %" PRIu8 - ")\n", + "Not enough data left. (Expected 1 byte of address length, got %hhu)\n", len); goto out; } @@ -1157,15 +1152,14 @@ static int unpack_item_area_address(uint16_t mtid, uint8_t len, rv->len = stream_getc(s); if (len < 1 + rv->len) { - sbuf_push(log, indent, "Not enough data left. (Expected %" PRIu8 - " bytes of address, got %" PRIu8 ")\n", + sbuf_push(log, indent, "Not enough data left. (Expected %hhu bytes of address, got %hhu)\n", rv->len, len - 1); goto out; } if (rv->len < 1 || rv->len > 20) { sbuf_push(log, indent, - "Implausible area address length %" PRIu8 "\n", + "Implausible area address length %hhu\n", rv->len); goto out; } @@ -1197,7 +1191,7 @@ static void format_item_oldstyle_reach(uint16_t mtid, struct isis_item *i, { struct isis_oldstyle_reach *r = (struct isis_oldstyle_reach *)i; - sbuf_push(buf, indent, "IS Reachability: %s (Metric: %" PRIu8 ")\n", + sbuf_push(buf, indent, "IS Reachability: %s (Metric: %hhu)\n", isis_format_id(r->id, 7), r->metric); } @@ -1232,8 +1226,7 @@ static int unpack_item_oldstyle_reach(uint16_t mtid, uint8_t len, if (len < 11) { sbuf_push( log, indent, - "Not enough data left.(Expected 11 bytes of reach information, got %" PRIu8 - ")\n", + "Not enough data left.(Expected 11 bytes of reach information, got %hhu)\n", len); return 1; } @@ -1298,8 +1291,7 @@ static int unpack_item_lan_neighbor(uint16_t mtid, uint8_t len, if (len < 6) { sbuf_push( log, indent, - "Not enough data left.(Expected 6 bytes of mac, got %" PRIu8 - ")\n", + "Not enough data left.(Expected 6 bytes of mac, got %hhu)\n", len); return 1; } @@ -1332,8 +1324,7 @@ static void format_item_lsp_entry(uint16_t mtid, struct isis_item *i, struct isis_lsp_entry *e = (struct isis_lsp_entry *)i; sbuf_push(buf, indent, - "LSP Entry: %s, seq 0x%08" PRIx32 ", cksum 0x%04" PRIx16 - ", lifetime %" PRIu16 "s\n", + "LSP Entry: %s, seq 0x%08x, cksum 0x%04hx, lifetime %hus\n", isis_format_id(e->id, 8), e->seqno, e->checksum, e->rem_lifetime); } @@ -1367,7 +1358,7 @@ static int unpack_item_lsp_entry(uint16_t mtid, uint8_t len, struct stream *s, if (len < 16) { sbuf_push( log, indent, - "Not enough data left. (Expected 16 bytes of LSP info, got %" PRIu8, + "Not enough data left. (Expected 16 bytes of LSP info, got %hhu", len); return 1; } @@ -1465,8 +1456,7 @@ static int unpack_item_extended_reach(uint16_t mtid, uint8_t len, if (len < 11) { sbuf_push(log, indent, - "Not enough data left. (expected 11 or more bytes, got %" - PRIu8 ")\n", + "Not enough data left. (expected 11 or more bytes, got %hhu)\n", len); goto out; } @@ -1478,13 +1468,12 @@ static int unpack_item_extended_reach(uint16_t mtid, uint8_t len, if ((size_t)len < ((size_t)11) + subtlv_len) { sbuf_push(log, indent, - "Not enough data left for subtlv size %" PRIu8 - ", there are only %" PRIu8 " bytes left.\n", + "Not enough data left for subtlv size %hhu, there are only %hhu bytes left.\n", subtlv_len, len - 11); goto out; } - sbuf_push(log, indent, "Storing %" PRIu8 " bytes of subtlvs\n", + sbuf_push(log, indent, "Storing %hhu bytes of subtlvs\n", subtlv_len); if (subtlv_len) { @@ -1523,7 +1512,7 @@ static void format_item_oldstyle_ip_reach(uint16_t mtid, struct isis_item *i, struct isis_oldstyle_ip_reach *r = (struct isis_oldstyle_ip_reach *)i; char prefixbuf[PREFIX2STR_BUFFER]; - sbuf_push(buf, indent, "IP Reachability: %s (Metric: %" PRIu8 ")\n", + sbuf_push(buf, indent, "IP Reachability: %s (Metric: %hhu)\n", prefix2str(&r->prefix, prefixbuf, sizeof(prefixbuf)), r->metric); } @@ -1561,8 +1550,7 @@ static int unpack_item_oldstyle_ip_reach(uint16_t mtid, uint8_t len, if (len < 12) { sbuf_push( log, indent, - "Not enough data left.(Expected 12 bytes of reach information, got %" PRIu8 - ")\n", + "Not enough data left.(Expected 12 bytes of reach information, got %hhu)\n", len); return 1; } @@ -1711,8 +1699,7 @@ static int unpack_item_ipv4_address(uint16_t mtid, uint8_t len, if (len < 4) { sbuf_push( log, indent, - "Not enough data left.(Expected 4 bytes of IPv4 address, got %" PRIu8 - ")\n", + "Not enough data left.(Expected 4 bytes of IPv4 address, got %hhu)\n", len); return 1; } @@ -1773,8 +1760,7 @@ static int unpack_item_ipv6_address(uint16_t mtid, uint8_t len, if (len < 16) { sbuf_push( log, indent, - "Not enough data left.(Expected 16 bytes of IPv6 address, got %" PRIu8 - ")\n", + "Not enough data left.(Expected 16 bytes of IPv6 address, got %hhu)\n", len); return 1; } @@ -1845,8 +1831,7 @@ static int unpack_item_mt_router_info(uint16_t mtid, uint8_t len, if (len < 2) { sbuf_push( log, indent, - "Not enough data left.(Expected 2 bytes of MT info, got %" PRIu8 - ")\n", + "Not enough data left.(Expected 2 bytes of MT info, got %hhu)\n", len); return 1; } @@ -2023,7 +2008,7 @@ static int unpack_item_extended_ip_reach(uint16_t mtid, uint8_t len, consume = 5; if (len < consume) { sbuf_push(log, indent, - "Not enough data left. (expected 5 or more bytes, got %" PRIu8 ")\n", + "Not enough data left. (expected 5 or more bytes, got %hhu)\n", len); goto out; } @@ -2073,8 +2058,7 @@ static int unpack_item_extended_ip_reach(uint16_t mtid, uint8_t len, consume += subtlv_len; if (len < consume) { sbuf_push(log, indent, - "Expected %" PRIu8 - " bytes of subtlvs, but only %u bytes available.\n", + "Expected %hhu bytes of subtlvs, but only %u bytes available.\n", subtlv_len, len - 6 - PSIZE(rv->prefix.prefixlen)); goto out; @@ -2207,7 +2191,7 @@ static void format_tlv_spine_leaf(const struct isis_spine_leaf *spine_leaf, if (spine_leaf->tier == ISIS_TIER_UNDEFINED) { sbuf_push(buf, indent, " Tier: undefined\n"); } else { - sbuf_push(buf, indent, " Tier: %" PRIu8 "\n", + sbuf_push(buf, indent, " Tier: %hhu\n", spine_leaf->tier); } } @@ -2340,14 +2324,14 @@ static void format_tlv_threeway_adj(const struct isis_threeway_adj *threeway_adj sbuf_push(buf, indent, " State: %s (%d)\n", isis_threeway_state_name(threeway_adj->state), threeway_adj->state); - sbuf_push(buf, indent, " Extended Local Circuit ID: %" PRIu32 "\n", + sbuf_push(buf, indent, " Extended Local Circuit ID: %u\n", threeway_adj->local_circuit_id); if (!threeway_adj->neighbor_set) return; sbuf_push(buf, indent, " Neighbor System ID: %s\n", isis_format_id(threeway_adj->neighbor_id, 6)); - sbuf_push(buf, indent, " Neighbor Extended Circuit ID: %" PRIu32 "\n", + sbuf_push(buf, indent, " Neighbor Extended Circuit ID: %u\n", threeway_adj->neighbor_circuit_id); } @@ -2506,8 +2490,7 @@ static int unpack_item_ipv6_reach(uint16_t mtid, uint8_t len, struct stream *s, consume = 6; if (len < consume) { sbuf_push(log, indent, - "Not enough data left. (expected 6 or more bytes, got %" - PRIu8 ")\n", + "Not enough data left. (expected 6 or more bytes, got %hhu)\n", len); goto out; } @@ -2559,8 +2542,7 @@ static int unpack_item_ipv6_reach(uint16_t mtid, uint8_t len, struct stream *s, consume += subtlv_len; if (len < consume) { sbuf_push(log, indent, - "Expected %" PRIu8 - " bytes of subtlvs, but only %u bytes available.\n", + "Expected %hhu bytes of subtlvs, but only %u bytes available.\n", subtlv_len, len - 6 - PSIZE(rv->prefix.prefixlen)); goto out; @@ -2910,12 +2892,12 @@ static void format_item_auth(uint16_t mtid, struct isis_item *i, case ISIS_PASSWD_TYPE_HMAC_MD5: for (unsigned int j = 0; j < 16; j++) { snprintf(obuf + 2 * j, sizeof(obuf) - 2 * j, - "%02" PRIx8, auth->value[j]); + "%02hhx", auth->value[j]); } sbuf_push(buf, indent, " HMAC-MD5: %s\n", obuf); break; default: - sbuf_push(buf, indent, " Unknown (%" PRIu8 ")\n", auth->type); + sbuf_push(buf, indent, " Unknown (%hhu)\n", auth->type); break; } } @@ -2961,8 +2943,7 @@ static int unpack_item_auth(uint16_t mtid, uint8_t len, struct stream *s, if (len < 1) { sbuf_push( log, indent, - "Not enough data left.(Expected 1 bytes of auth type, got %" PRIu8 - ")\n", + "Not enough data left.(Expected 1 bytes of auth type, got %hhu)\n", len); return 1; } @@ -2975,8 +2956,7 @@ static int unpack_item_auth(uint16_t mtid, uint8_t len, struct stream *s, if (rv->type == ISIS_PASSWD_TYPE_HMAC_MD5 && rv->length != 16) { sbuf_push( log, indent, - "Unexpected auth length for HMAC-MD5 (expected 16, got %" PRIu8 - ")\n", + "Unexpected auth length for HMAC-MD5 (expected 16, got %hhu)\n", rv->length); XFREE(MTYPE_ISIS_TLV, rv); return 1; @@ -3060,8 +3040,7 @@ static int unpack_tlv_purge_originator(enum isis_tlv_context context, sbuf_push(log, indent, "Unpacking Purge Originator Identification TLV...\n"); if (tlv_len < 7) { - sbuf_push(log, indent, "Not enough data left. (Expected at least 7 bytes, got %" - PRIu8 ")\n", tlv_len); + sbuf_push(log, indent, "Not enough data left. (Expected at least 7 bytes, got %hhu)\n", tlv_len); return 1; } @@ -3072,8 +3051,7 @@ static int unpack_tlv_purge_originator(enum isis_tlv_context context, } else if (number_of_ids == 2) { poi.sender_set = true; } else { - sbuf_push(log, indent, "Got invalid value for number of system IDs: %" - PRIu8 ")\n", number_of_ids); + sbuf_push(log, indent, "Got invalid value for number of system IDs: %hhu)\n", number_of_ids); return 1; } @@ -4017,7 +3995,7 @@ static int unpack_tlv_unknown(enum isis_tlv_context context, uint8_t tlv_type, { stream_forward_getp(s, tlv_len); sbuf_push(log, indent, - "Skipping unknown TLV %" PRIu8 " (%" PRIu8 " bytes)\n", + "Skipping unknown TLV %hhu (%hhu bytes)\n", tlv_type, tlv_len); return 0; } @@ -4043,12 +4021,12 @@ static int unpack_tlv(enum isis_tlv_context context, size_t avail_len, tlv_len = stream_getc(stream); sbuf_push(log, indent + 2, - "Found TLV of type %" PRIu8 " and len %" PRIu8 ".\n", + "Found TLV of type %hhu and len %hhu.\n", tlv_type, tlv_len); if (avail_len < ((size_t)tlv_len) + 2) { sbuf_push(log, indent + 2, - "Available data %zu too short for claimed TLV len %" PRIu8 ".\n", + "Available data %zu too short for claimed TLV len %hhu.\n", avail_len - 2, tlv_len); return 1; } diff --git a/isisd/isisd.c b/isisd/isisd.c index 53e48bd1c..6f126b7fa 100644 --- a/isisd/isisd.c +++ b/isisd/isisd.c @@ -1344,7 +1344,7 @@ DEFUN (show_isis_summary, if (tier == ISIS_TIER_UNDEFINED) vty_out(vty, " Tier: undefined\n"); else - vty_out(vty, " Tier: %" PRIu8 "\n", tier); + vty_out(vty, " Tier: %hhu\n", tier); } if (listcount(area->area_addrs) > 0) { |