Make more use of Wireshark's utility functions for nstime_ts for code clarity.
Use nstime_copy() instead of individually copying member attributes.
Use nstime_is_zero() to test for an unchanged timestamp instead of inconsistently testing .secs == 0 or .nsecs == 0 in different places.
Define a constant MAX_SYN_ACK_TIMES to replace the hardcoded magic number of elements in syn_ack_times. Fix an array bounds overflow that could happen when this size limit was hit.
Fix an apparent copy-paste error where timestamp_D was being tested but timestamp_C was being assigned to.
Make more use of Wireshark's utility functions for
nstime_t
s for code clarity.Use
nstime_copy()
instead of individually copying member attributes.Use
nstime_is_zero()
to test for an unchanged timestamp instead of inconsistently testing.secs == 0
or.nsecs == 0
in different places.Define a constant
MAX_SYN_ACK_TIMES
to replace the hardcoded magic number of elements insyn_ack_times
. Fix an array bounds overflow that could happen when this size limit was hit.Fix an apparent copy-paste error where
timestamp_D
was being tested buttimestamp_C
was being assigned to.