From: Mathieu Desnoyers Date: Tue, 13 Nov 2018 17:12:20 +0000 (-0500) Subject: Fix: Connect timeout arithmetic in inet/inet6 (v4) X-Git-Tag: v2.9.11~8 X-Git-Url: http://git.liburcu.org/?a=commitdiff_plain;h=f6739b01e44d8f106e5e971ea2551f5e6fb75cf9;hp=f6739b01e44d8f106e5e971ea2551f5e6fb75cf9;p=lttng-tools.git Fix: Connect timeout arithmetic in inet/inet6 (v4) The nanoseconds part of the timespec struct time_a is not always bigger than time_b since it wraps around each second. Use 64-bit arithmetic to compute the difference. Merge/move duplicated code into utils.c. This function is really doing two things. Split it into timespec_to_ms() and timespec_abs_diff(). Signed-off-by: Mathieu Desnoyers Signed-off-by: Jérémie Galarneau ---