more static analyser fixups

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@36532 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-MacDonald 2013-04-14 18:49:23 +00:00
parent 119c9a28c2
commit f371df09b6
8 changed files with 50 additions and 46 deletions

View file

@ -777,9 +777,17 @@ NSDecimalPower(NSDecimal *result, const NSDecimal *n, NSUInteger power, NSRoundi
if (e & 1)
{
error = NSDecimalMultiply(result, result, &n1, mode);
if (NSCalculationNoError != error)
{
break;
}
}
// keep on squaring the number
error = NSDecimalMultiply(&n1, &n1, &n1, mode);
if (NSCalculationNoError != error)
{
break;
}
e >>= 1;
}