]> The Tcpdump Group git mirrors - tcpdump/commit
Fix some narrowing warnings on LP64/LLP64 platforms.
authorGuy Harris <[email protected]>
Thu, 18 Apr 2019 17:13:49 +0000 (10:13 -0700)
committerGuy Harris <[email protected]>
Thu, 18 Apr 2019 17:13:49 +0000 (10:13 -0700)
commit07a7f33ba3ff346b9ce31772645a06980baca907
tree111a5a89cefb1c27e83b1aa4fb7a95e7c6163b8d
parent7c30120f52c22c1dd971431383ad2df8ca1a12c4
Fix some narrowing warnings on LP64/LLP64 platforms.

Add a ND_BYTES_AVAILABLE_AFTER() macro to find the number of bytes
available in the captured data, starting at the byte pointed to by the
argument.  It returns a u_int rather than a ptrdiff_t, so it'll be
32 bits on LP64 and LLP64 platforms as well as on ILP32 platforms.  Use
that macro.

Make size-of-buffer arguments size_t.

Cast some size_t and ptrdiff_t values to u_int or int.
19 files changed:
netdissect.h
print-ascii.c
print-bgp.c
print-chdlc.c
print-fr.c
print-geneve.c
print-gre.c
print-lisp.c
print-lwres.c
print-mobility.c
print-nsh.c
print-olsr.c
print-openflow-1.0.c
print-otv.c
print-ppp.c
print-rip.c
print-telnet.c
print-vxlan-gpe.c
print-vxlan.c