libbsd: fix timespeccmp()

Change-Id: I5c1b1e5c4c583c0758b9f1b6eee67cb83053461d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7514
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
This commit is contained in:
Jérôme Duval 2024-03-07 22:08:43 +01:00 committed by waddlesplash
parent afeee28538
commit 142723d197
1 changed files with 1 additions and 1 deletions

View File

@ -35,7 +35,7 @@
#define timespecclear(a) ((a)->tv_sec = (a)->tv_nsec = 0)
#define timespecisset(a) ((a)->tv_sec != 0 || (a)->tv_nsec != 0)
#define timespeccmp(a, b, cmp) (((a)->tv_sec == (b)->tv_sec) \
? (a)->tv_nsec cmp (b)->tv_nsec : (a)->tv_sec cmp (b)->tv_sec))
? ((a)->tv_nsec cmp (b)->tv_nsec) : ((a)->tv_sec cmp (b)->tv_sec))
#define timespecvalid_interval(a) ((a)->tv_sec >= 0 \
&& (a)->tv_nsec >= 0 && (&)->tv_nsec < 1000000000L)