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.
This commit is contained in:
parent
277f0f67c5
commit
12d8af4c67
@ -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.
|
||||
|
@ -31,11 +31,11 @@
|
||||
#include <time.h>
|
||||
#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)
|
||||
|
Loading…
Reference in New Issue
Block a user