Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src/sys/kern



On Fri, 16 Jan 2009, YAMAMOTO Takashi wrote:
> cache_prune: use (a - b > 0) rather than (a > b) to compare ticks.

Why?  At first glance, both tests do the same thing.

Both the variables are signed int, so there could be cases where a-b is
undefined while a>b is defined.  Is this likely to be a problem, or are
the actual ranges of the variables such that overflow can't happen?

--apb (Alan Barrett)


Home | Main Index | Thread Index | Old Index