diff options
author | Steven Barth <steven@midlink.org> | 2014-03-07 10:33:49 +0100 |
---|---|---|
committer | Steven Barth <steven@midlink.org> | 2014-03-07 10:33:49 +0100 |
commit | 5b98f902f616bd9b96a2128587bc6995555a43c1 (patch) | |
tree | 0557bc980ad1c54fad1981f5326dcc218e763079 /src/odhcp6c.c | |
parent | 7c733630c49f1c8a7a43e701fa0b849ab9e473a5 (diff) | |
download | odhcp6c-5b98f902f616bd9b96a2128587bc6995555a43c1.tar.gz |
fix integer overflow after 50 days (thx Hauke Mehrtens)
Diffstat (limited to 'src/odhcp6c.c')
-rw-r--r-- | src/odhcp6c.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/odhcp6c.c b/src/odhcp6c.c index 3c6b3b0..ba11ced 100644 --- 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; } |