Skip to content
Snippets Groups Projects
Commit 50d5b07e authored by Martine Lenders's avatar Martine Lenders Committed by GitHub
Browse files

Merge pull request #6557 from miri64/udp_icmpv6/fix/formatter

icmpv6: udp: fix formatter of checksum in header print functions
parents 2ef1f2e8 37f6eb63
No related branches found
No related tags found
No related merge requests found
......@@ -22,6 +22,6 @@
void icmpv6_hdr_print(icmpv6_hdr_t *hdr)
{
printf(" type: %3" PRIu8 " code: %3" PRIu8 "\n", hdr->type, hdr->code);
printf(" cksum: 0x4%" PRIx16 "\n", byteorder_ntohs(hdr->csum));
printf(" cksum: 0x%04" PRIx16 "\n", byteorder_ntohs(hdr->csum));
}
/** @} */
......@@ -27,6 +27,6 @@ void udp_hdr_print(udp_hdr_t *hdr)
{
printf(" src-port: %5" PRIu16 " dst-port: %5" PRIu16 "\n",
byteorder_ntohs(hdr->src_port), byteorder_ntohs(hdr->dst_port));
printf(" length: %" PRIu16 " cksum: 0x4%" PRIx16 "\n",
printf(" length: %" PRIu16 " cksum: 0x%04" PRIx16 "\n",
byteorder_ntohs(hdr->length), byteorder_ntohs(hdr->checksum));
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment