]> The Tcpdump Group git mirrors - tcpdump/commitdiff
OSPFv3: Use %zu to print sizeof values
authorFrancois-Xavier Le Bail <[email protected]>
Wed, 4 Nov 2020 15:21:58 +0000 (16:21 +0100)
committerFrancois-Xavier Le Bail <[email protected]>
Wed, 4 Nov 2020 15:28:36 +0000 (16:28 +0100)
Moreover:
Fix indentation.

print-ospf6.c

index 29014d74c8b019ece3b44a5eb3cd81ca5051eaae..1b862b3041aa307bcd10ba51d41b6d98e6fa109f 100644 (file)
@@ -391,11 +391,11 @@ ospf6_print_lshdr(netdissect_options *ndo,
        if ((const u_char *)(lshp + 1) > dataend)
                goto trunc;
 
-       ND_PRINT("\n\t  Advertising Router %s, seq 0x%08x, age %us, length %u",
-               GET_IPADDR_STRING(lshp->ls_router),
-               GET_BE_U_4(lshp->ls_seq),
-               GET_BE_U_2(lshp->ls_age),
-               GET_BE_U_2(lshp->ls_length)-(u_int)sizeof(struct lsa6_hdr));
+       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),
+                GET_BE_U_2(lshp->ls_length)-sizeof(struct lsa6_hdr));
 
        ospf6_print_ls_type(ndo, GET_BE_U_2(lshp->ls_type),
                            &lshp->ls_stateid);