uloop: restore return type of uloop_timeout_remaining
authorStijn Tintel <stijn@linux-ipv6.be>
Thu, 4 Nov 2021 10:14:02 +0000 (12:14 +0200)
committerStijn Tintel <stijn@linux-ipv6.be>
Thu, 4 Nov 2021 11:03:25 +0000 (13:03 +0200)
commit123e976f3d012b310ac223a54b7ef5213107e33d
tree29efd101d31d8bd8930482e5130d8f6bcc9b3636
parentbe3dc7223a6d75587e26f8b8d6d56920841e44b6
uloop: restore return type of uloop_timeout_remaining

The uloop_timeout_remaining function is public and changing its return
type breaks ABI. Change the return type back to int, and return INT_MIN
or INT_MAX if the value returned by tv_diff would overflow integer.

Fixes: be3dc7223a6d ("uloop: avoid integer overflow in tv_diff")
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
Acked-by: Jo-Philipp Wich <jo@mein.io>
Acked-by: John Crispin <john@phrozen.org>
uloop.c
uloop.h