]> The Tcpdump Group git mirrors - tcpdump/commit
Do time stamp deltas with unsigned arithmetic.
authorGuy Harris <[email protected]>
Sat, 3 Feb 2018 02:26:50 +0000 (18:26 -0800)
committerGuy Harris <[email protected]>
Sat, 3 Feb 2018 02:26:50 +0000 (18:26 -0800)
commita0f4e3003ee3f6789104727799e005c7f34e51c5
tree772a4b0e369918e757cdd64040e66794b01e05cf
parent784b86ec5fbd9d2c432ffef7b8ed61564fefd2a0
Do time stamp deltas with unsigned arithmetic.

First, check whether the originate timestamp is greater than the other
timestamp and, if so, calculate (originate - other) and print a -
instead of a + before it.  This means we're not trying to stuff the
difference between two unsigned values into a signed value of the same
width (the result of which is undefined if the difference doesn't fit in
the signed variable).
print-ntp.c