]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
time-util: Fix overflow check introduce in commit f977849 (#5216)
authorBenjamin Robin <benjarobin@users.noreply.github.com>
Fri, 3 Feb 2017 15:13:55 +0000 (16:13 +0100)
committerLennart Poettering <lennart@poettering.net>
Fri, 3 Feb 2017 15:13:55 +0000 (16:13 +0100)
src/basic/time-util.c

index 4ced1bc6a1b57b6c72002c282cd45e4fea833270..a0db97c41a73fdaaeff815df9d49debf0278b11a 100644 (file)
@@ -212,7 +212,7 @@ struct timespec *timespec_store(struct timespec *ts, usec_t u)  {
         assert(ts);
 
         if (u == USEC_INFINITY ||
-            u / USEC_INFINITY >= TIME_T_MAX) {
+            u / USEC_PER_SEC >= TIME_T_MAX) {
                 ts->tv_sec = (time_t) -1;
                 ts->tv_nsec = (long) -1;
                 return ts;