]> The Tcpdump Group git mirrors - tcpdump/commitdiff
OSPF: Use %zu to print sizeof values
authorFrancois-Xavier Le Bail <[email protected]>
Wed, 4 Nov 2020 15:19:54 +0000 (16:19 +0100)
committerFrancois-Xavier Le Bail <[email protected]>
Wed, 4 Nov 2020 15:28:36 +0000 (16:28 +0100)
print-ospf.c

index a385d7a1bfde05009150a4f25a4058e264a7a118..8e6a003f4d2fdbc7687b10f0525bb854224fd82e 100644 (file)
@@ -533,11 +533,11 @@ ospf_print_lshdr(netdissect_options *ndo,
                     sizeof(struct lsa_hdr));
                 return(-1);
         }
-        ND_PRINT("\n\t  Advertising Router %s, seq 0x%08x, age %us, length %u",
+        ND_PRINT("\n\t  Advertising Router %s, seq 0x%08x, age %us, length %zu",
                   GET_IPADDR_STRING(lshp->ls_router),
                   GET_BE_U_4(lshp->ls_seq),
                   GET_BE_U_2(lshp->ls_age),
-                  ls_length - (u_int)sizeof(struct lsa_hdr));
+                  ls_length - sizeof(struct lsa_hdr));
         ls_type = GET_U_1(lshp->ls_type);
         switch (ls_type) {
         /* the LSA header for opaque LSAs was slightly changed */