svn commit: r218966 - head/sys/vm
bruce at cran.org.uk
Sun Feb 27 09:47:10 UTC 2011
On Thu, 2011-02-24 at 10:36 +1100, Bruce Evans wrote:
> I would cast operand(s) in the expression as necessary to prevent overflow
> of subexpressions. vm_pindex_t would work, but I prefer to use a type
> related to the subexpressions. Not sure what that is. Maybe just
> uintmax_t for safety (even that is not safe if the subexpressions have
> large values). So:
> (uintmax_t)swap_bcount * SWAP_META_PAGES * n / mumble.
Following Alan's suggestion, I've attached an updated patch which uses a
cast to u_long and returns long.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 1267 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/svn-src-head/attachments/20110227/edfc4448/vm.bin
More information about the svn-src-head