From 12d8af4c67f22412c0c5dd9276bd1648c63b10b7 Mon Sep 17 00:00:00 2001 From: "Nicholas J. Kain" Date: Wed, 27 May 2015 23:40:28 -0400 Subject: [PATCH] Convert remaining ull time-types to ll. Thus signed/unsigned conversion issues can't be a problem. The extra range provided by ull isn't useful, either, since we're dealing with uint32_t time_t seconds converted to ns, which doesn't come close to exhausting the amount of post-epoch ns that will be consumed until after 2100AD. --- src/ndhc.h | 2 +- src/sys.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ndhc.h b/src/ndhc.h index 467a102..76a4e6c 100644 --- a/src/ndhc.h +++ b/src/ndhc.h @@ -36,7 +36,7 @@ struct client_state_t { struct nk_random_state_u32 rnd32_state; - unsigned long long leaseStartTime, renewTime, rebindTime; + long long leaseStartTime, renewTime, rebindTime; long long dhcp_wake_ts; int ifsPrevState; int ifDeconfig; // Set if the interface has already been deconfigured. diff --git a/src/sys.h b/src/sys.h index 598bc8a..b3bc685 100644 --- a/src/sys.h +++ b/src/sys.h @@ -31,11 +31,11 @@ #include #include "ndhc-defines.h" -static inline unsigned long long curms() +static inline long long curms() { struct timespec ts; clock_gettime(CLOCK_MONOTONIC, &ts); - return ts.tv_sec * 1000ULL + ts.tv_nsec / 1000000ULL; + return ts.tv_sec * 1000LL + ts.tv_nsec / 1000000LL; } static inline size_t min_size_t(size_t a, size_t b)