From: Francois-Xavier Le Bail Date: Wed, 4 Nov 2020 14:00:34 +0000 (+0100) Subject: SCTP: Use %zu to print sizeof values X-Git-Tag: tcpdump-4.99-bp~67 X-Git-Url: https://git.tcpdump.org/tcpdump/commitdiff_plain/51cb49b21dcad1a112ff25e62e5e67dbd28f33b8?hp=1a9542cfd1f59a329e8cb32fb1737e7c8a11ecd2 SCTP: Use %zu to print sizeof values Use 'u' for an unsigned value. --- diff --git a/print-sctp.c b/print-sctp.c index b5923ea6..ad0f7851 100644 --- a/print-sctp.c +++ b/print-sctp.c @@ -467,8 +467,8 @@ sctp_print(netdissect_options *ndo, ndo->ndo_protocol = "sctp"; if (sctpPacketLength < sizeof(struct sctpHeader)) { - ND_PRINT("truncated-sctp - %ld bytes missing!", - (long)(sizeof(struct sctpHeader) - sctpPacketLength)); + ND_PRINT("truncated-sctp - %zu bytes missing!", + sizeof(struct sctpHeader) - sctpPacketLength); return; } sctpPktHdr = (const struct sctpHeader*) bp;