kern_time.c contains an if-clause that also appears in the NetBSD source
that is always true and hence has no effect. The patch below cleans this
up assuming the wrap-around protection should remain in place (FreeBSD
just wraps).
The patch itself is purely cosmetic and shouldn't affect the compiled code
in any way.
---
diff --git sys/kern/kern_time.c sys/kern/kern_time.c
index d34329ee642..a508289f011 100644
--- sys/kern/kern_time.c
+++ sys/kern/kern_time.c
@@ -824,20 +824,9 @@ ppsratecheck(struct timeval *lasttime, int
*curpps, int maxpps)
else
rv = 0;
-#if 1 /*DIAGNOSTIC?*/
/* be careful about wrap-around */
if (*curpps + 1 > *curpps)
*curpps = *curpps + 1;
-#else
- /*
- * assume that there's not too many calls to this function.
- * not sure if the assumption holds, as it depends on *caller's*
- * behavior, not the behavior of this function.
- * IMHO it is wrong to make assumption on the caller's behavior,
- * so the above #if is #if 1, not #ifdef DIAGNOSTIC.
- */
- *curpps = *curpps + 1;
-#endif
return (rv);
}