Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F141110660
D1197.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D1197.id.diff
View Options
Index: head/usr.sbin/rtadvd/rtadvd.c
===================================================================
--- head/usr.sbin/rtadvd/rtadvd.c
+++ head/usr.sbin/rtadvd/rtadvd.c
@@ -1230,6 +1230,12 @@
return;
}
+static uint32_t
+udiff(uint32_t u, uint32_t v)
+{
+ return (u >= v ? u - v : v - u);
+}
+
/* return a non-zero value if the received prefix is inconsitent with ours */
static int
prefix_check(struct nd_opt_prefix_info *pinfo,
@@ -1288,7 +1294,7 @@
preferred_time += now.tv_sec;
if (!pfx->pfx_timer && rai->rai_clockskew &&
- abs(preferred_time - pfx->pfx_pltimeexpire) > rai->rai_clockskew) {
+ udiff(preferred_time, pfx->pfx_pltimeexpire) > rai->rai_clockskew) {
syslog(LOG_INFO,
"<%s> preferred lifetime for %s/%d"
" (decr. in real time) inconsistent on %s:"
@@ -1321,7 +1327,7 @@
valid_time += now.tv_sec;
if (!pfx->pfx_timer && rai->rai_clockskew &&
- abs(valid_time - pfx->pfx_vltimeexpire) > rai->rai_clockskew) {
+ udiff(valid_time, pfx->pfx_vltimeexpire) > rai->rai_clockskew) {
syslog(LOG_INFO,
"<%s> valid lifetime for %s/%d"
" (decr. in real time) inconsistent on %s:"
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Jan 2, 12:11 AM (3 h, 52 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
27447778
Default Alt Text
D1197.id.diff (1 KB)
Attached To
Mode
D1197: Fix clang 3.5.0 warnings in usr.sbin/rtadvd
Attached
Detach File
Event Timeline
Log In to Comment