]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
time_t is not always unsigned.
authorRoy Marples <roy@marples.name>
Fri, 16 Jan 2015 22:53:40 +0000 (22:53 +0000)
committerRoy Marples <roy@marples.name>
Fri, 16 Jan 2015 22:53:40 +0000 (22:53 +0000)
ipv6.c

diff --git a/ipv6.c b/ipv6.c
index 25f5b22b02b591a95d6594ba429299ed987acc32..2142c1736e2dd1cf34ca2f3871bd4cc24e898acf 100644 (file)
--- a/ipv6.c
+++ b/ipv6.c
@@ -640,9 +640,9 @@ ipv6_addaddr(struct ipv6_addr *ap, const struct timeval *now)
                }
                timersub(now, &ap->acquired, &n);
                if (ap->prefix_pltime != ND6_INFINITE_LIFETIME)
-                       ap->prefix_pltime -= n.tv_sec;
+                       ap->prefix_pltime -= (uint32_t)n.tv_sec;
                if (ap->prefix_vltime != ND6_INFINITE_LIFETIME)
-                       ap->prefix_vltime -= n.tv_sec;
+                       ap->prefix_vltime -= (uint32_t)n.tv_sec;
        }
 
        syslog(ap->flags & IPV6_AF_NEW ? LOG_INFO : LOG_DEBUG,