Expect long long to be larger than uint32_t and use llabs after casting

the uint32_t.
This commit is contained in:
joerg 2014-02-27 17:43:02 +00:00
parent 937ce279d6
commit 33ddbd4a4d
1 changed files with 3 additions and 3 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: rtadvd.c,v 1.45 2014/01/26 08:31:17 plunky Exp $ */
/* $NetBSD: rtadvd.c,v 1.46 2014/02/27 17:43:02 joerg Exp $ */
/* $KAME: rtadvd.c,v 1.92 2005/10/17 14:40:02 suz Exp $ */
/*
@ -1249,7 +1249,7 @@ prefix_check(struct nd_opt_prefix_info *pinfo,
preferred_time += now.tv_sec;
if (!pp->timer && rai->clockskew &&
abs(preferred_time - pp->pltimeexpire) > rai->clockskew) {
llabs((long long)preferred_time - pp->pltimeexpire) > rai->clockskew) {
syslog(LOG_INFO,
"<%s> preferred lifetime for %s/%d"
" (decr. in real time) inconsistent on %s:"
@ -1285,7 +1285,7 @@ prefix_check(struct nd_opt_prefix_info *pinfo,
valid_time += now.tv_sec;
if (!pp->timer && rai->clockskew &&
abs(valid_time - pp->vltimeexpire) > rai->clockskew) {
llabs((long long)valid_time - pp->vltimeexpire) > rai->clockskew) {
syslog(LOG_INFO,
"<%s> valid lifetime for %s/%d"
" (decr. in real time) inconsistent on %s:"