svn commit: r209388 - in head/sbin/geom: class/part core misc
Andrey Chernov
ache at nagual.pp.ru
Mon Jun 21 11:12:56 UTC 2010
On Mon, Jun 21, 2010 at 08:24:51AM +0000, Andrey V. Elsukov wrote:
> +done:
> + if (mult * unit < mult || number * mult * unit < number)
> + return (ERANGE);
A general rule is: don't check for overflow when it already occurs,
since result can be any, including valid ones.
Redo it to before overflow stage (using things like OFF_MAX / unit).
--
http://ache.pp.ru/
More information about the svn-src-all
mailing list