Module Name: src Committed By: joerg Date: Thu Feb 27 17:43:02 UTC 2014
Modified Files: src/usr.sbin/rtadvd: rtadvd.c Log Message: Expect long long to be larger than uint32_t and use llabs after casting the uint32_t. To generate a diff of this commit: cvs rdiff -u -r1.45 -r1.46 src/usr.sbin/rtadvd/rtadvd.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/usr.sbin/rtadvd/rtadvd.c diff -u src/usr.sbin/rtadvd/rtadvd.c:1.45 src/usr.sbin/rtadvd/rtadvd.c:1.46 --- src/usr.sbin/rtadvd/rtadvd.c:1.45 Sun Jan 26 08:31:17 2014 +++ src/usr.sbin/rtadvd/rtadvd.c Thu Feb 27 17:43:02 2014 @@ -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 * 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 * 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:"