Commit Graph

2 Commits

Author SHA1 Message Date
pooka 37ca5a0657 Signed overflow is undefined behavior, and one version of gcc
clearly tells us:

	kern_rate.c:98: warning: assuming signed overflow does not
	occur when assuming that (X + c) > X is always true

Check value against INT_MAX instead.  Also, for good measure throw
in a __predict() to flag the assumed common case.
2012-12-12 11:10:56 +00:00
pooka 44367b7199 Split rate-checking routines into their own module for easier reuse. 2008-09-25 17:17:10 +00:00