]> git.ipfire.org Git - thirdparty/systemd.git/commit
sd-event: don't mistake USEC_INFINITY passed in for overflow
authorLennart Poettering <lennart@poettering.net>
Fri, 6 Jan 2023 10:27:17 +0000 (11:27 +0100)
committerLennart Poettering <lennart@poettering.net>
Fri, 6 Jan 2023 10:29:09 +0000 (11:29 +0100)
commitef8591951aefccb668201f24aa481aa6cda834da
tree03c6ea4d9f94e403d141eff3fea0c31a3d4dd678
parent6e689dc6eedea558df3d98da4477d58432d2d29c
sd-event: don't mistake USEC_INFINITY passed in for overflow

Let's pass USEC_INFINITY from sd_event_source_set_time_relative() to
sd_event_source_set_time() instead of raising EOVERFLOW.

We should raise EOVERFLOW only if your addition fails, but not if the
input already is USEC_INFINITY, since it's an entirely valid operation
to have an infinite time-out, and we should support that.
src/libsystemd/sd-event/sd-event.c