g_dhcpv6_client_get_timeouts(dhcp->dhcp_client, NULL, NULL,
NULL, NULL, &expired);
- current = time(0);
+ current = time(NULL);
if (current > expired) {
DBG("expired by %d secs", (int)(current - expired));
g_dhcpv6_client_get_timeouts(dhcp->dhcp_client, &T1, &T2,
&last_renew, &last_rebind, &expired);
- current = time(0);
+ current = time(NULL);
DBG("T1 %u T2 %u expires %lu current %lu", T1, T2,
(unsigned long)expired, current);
{
DBG("");
- srand(time(0));
+ srand(time(NULL));
network_table = g_hash_table_new_full(g_direct_hash, g_direct_equal,
NULL, remove_network);
*/
static void cache_enforce_validity(struct cache_entry *entry)
{
- time_t current_time = time(0);
+ time_t current_time = time(NULL);
if (cache_check_is_valid(entry->ipv4, current_time) == FALSE
&& entry->ipv4) {
static uint16_t cache_check_validity(char *question, uint16_t type,
struct cache_entry *entry)
{
- time_t current_time = time(0);
+ time_t current_time = time(NULL);
int want_refresh = 0;
/*
struct cache_timeout data;
int count = 0;
- data.current_time = time(0);
+ data.current_time = time(NULL);
data.max_timeout = 0;
data.try_harder = 0;
return 0;
}
- current_time = time(0);
+ current_time = time(NULL);
/* don't do a cache refresh more than twice a minute */
if (next_refresh < current_time) {
data = entry->ipv6;
if (data) {
- ttl_left = data->valid_until - time(0);
+ ttl_left = data->valid_until - time(NULL);
entry->hits++;
}