projects
/
oweals
/
odhcp6c.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7c73363
)
fix integer overflow after 50 days (thx Hauke Mehrtens)
author
Steven Barth
<steven@midlink.org>
Fri, 7 Mar 2014 09:33:49 +0000
(10:33 +0100)
committer
Steven Barth
<steven@midlink.org>
Fri, 7 Mar 2014 09:33:49 +0000
(10:33 +0100)
src/odhcp6c.c
patch
|
blob
|
history
diff --git
a/src/odhcp6c.c
b/src/odhcp6c.c
index 3c6b3b05abd8db9eaeedb92dcf270dee90d8625b..ba11ced6d23af32e47676f40159951f6341fa6b9 100644
(file)
--- a/
src/odhcp6c.c
+++ b/
src/odhcp6c.c
@@
-470,7
+470,7
@@
uint64_t odhcp6c_get_milli_time(void)
{
struct timespec t = {0, 0};
syscall(SYS_clock_gettime, CLOCK_MONOTONIC, &t);
- return
t.tv_sec * 1000 + t.tv_nsec
/ 1000000;
+ return
((uint64_t)t.tv_sec) * 1000 + ((uint64_t)t.tv_nsec)
/ 1000000;
}