chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
b77471c
)
time-util: Fix overflow check introduce in commit f977849 (#5216)
author
Benjamin Robin
<benjarobin@users.noreply.github.com>
Fri, 3 Feb 2017 15:13:55 +0000
(16:13 +0100)
committer
Sven Eden
<yamakuzure@gmx.net>
Mon, 17 Jul 2017 15:58:36 +0000
(17:58 +0200)
src/basic/time-util.c
patch
|
blob
|
history
diff --git
a/src/basic/time-util.c
b/src/basic/time-util.c
index 6a76b655120d9bd73672e1ba095176dcec4553b0..a2b57f872716a37ecdb6de7adbbaf5f998c431cb 100644
(file)
--- a/
src/basic/time-util.c
+++ b/
src/basic/time-util.c
@@
-218,7
+218,7
@@
struct timespec *timespec_store(struct timespec *ts, usec_t u) {
assert(ts);
if (u == USEC_INFINITY ||
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;
ts->tv_sec = (time_t) -1;
ts->tv_nsec = (long) -1;
return ts;