summaryrefslogtreecommitdiff
path: root/stoc
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-06-24 12:01:55 +0100
committerCaolán McNamara <caolanm@redhat.com>2014-06-24 12:05:20 +0100
commita1b89677b79aa17db78e8eee010dea280c0f92a0 (patch)
tree16210cadfd5890ffdd7b034d51354637810adec8 /stoc
parenta74193306a10a98902d192b8f7cecb92b4817c23 (diff)
coverity#982255 Operands don't affect result
fVal started out as a double, but is now a sal_Int64 since commit 353607df2ed59f00ad67a74de29b3db662ea960a Author: Lars Langhans <lla@openoffice.org> Date: Mon Oct 9 13:21:27 2000 +0000 #79269# convert to hyper doesn't use toDouble any longer so the comparison is always false Change-Id: Ib0b0a78ba3763fb6564219e69111de13b5afc870
Diffstat (limited to 'stoc')
-rw-r--r--stoc/source/typeconv/convert.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/stoc/source/typeconv/convert.cxx b/stoc/source/typeconv/convert.cxx
index d04621fce285..1a6a081c235f 100644
--- a/stoc/source/typeconv/convert.cxx
+++ b/stoc/source/typeconv/convert.cxx
@@ -398,7 +398,7 @@ sal_Int64 TypeConverter_Impl::toHyper( const Any& rAny, sal_Int64 min, sal_uInt6
"invalid STRING value!",
Reference<XInterface>(), aDestinationClass, FailReason::IS_NOT_NUMBER, 0 );
}
- nRet = (fVal > SAL_INT64_MAX ? (sal_Int64)(sal_uInt64)fVal : (sal_Int64)fVal);
+ nRet = fVal;
if (fVal >= min && (fVal < 0 || ((sal_uInt64)fVal) <= max))
return nRet;
throw CannotConvertException(