summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2018-01-29 14:21:45 +0100
committerStephan Bergmann <sbergman@redhat.com>2018-01-29 19:44:37 +0100
commit85ee924f83173d4addd6ed22d8756fe6d66ccaba (patch)
treead3019d30d741c0efe5481e0edcb17c7bdf8fdd3 /sc
parentf104fb0b24d1a364a7a711b31b99770e4cd9183d (diff)
USHRT_MAX -> SAL_MAX_UINT16
nCount apparently must fit into sal_uInt16 for the cast further down when passing it into ScAppOptions::SetLRUFuncList sal_uInt16 nCount parameter. (But why the odd "nCount < SAL_MAX_UINT16" vs. "nCount <= SAL_MAX_UINT16" off-by-one? Oh, my.) Change-Id: I231f4af2ce2e6bf44db8db3fd9e965adfa17fecb Reviewed-on: https://gerrit.libreoffice.org/48838 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'sc')
-rw-r--r--sc/source/core/tool/appoptio.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/sc/source/core/tool/appoptio.cxx b/sc/source/core/tool/appoptio.cxx
index 8023c11db3b8..0331f7a896d0 100644
--- a/sc/source/core/tool/appoptio.cxx
+++ b/sc/source/core/tool/appoptio.cxx
@@ -131,7 +131,7 @@ static void lcl_SetLastFunctions( ScAppOptions& rOpt, const Any& rValue )
if ( rValue >>= aSeq )
{
sal_Int32 nCount = aSeq.getLength();
- if ( nCount < USHRT_MAX )
+ if ( nCount < SAL_MAX_UINT16 )
{
const sal_Int32* pArray = aSeq.getConstArray();
std::unique_ptr<sal_uInt16[]> pUShorts(new sal_uInt16[nCount]);