diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-10-10 10:44:56 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-10-10 12:50:20 +0100 |
commit | 51f7c69f4f07a00363c84097744f1a2bbcdc309a (patch) | |
tree | 56c36029f0fc852cbb98dbe1d275f535532b0305 /sal | |
parent | cbdf857299ebff0bcf2d10bf877bc74c2167a4e8 (diff) |
coverity#1240260 Operands don't affect result
see can we silence these false positives
coverity#1240259 Operands don't affect result
coverity#1240254 Operands don't affect result
coverity#1240264 Operands don't affect result
coverity#1240267 Operands don't affect result
Change-Id: Ieca40474c231e33a516b70f7693346ac73babd61
Diffstat (limited to 'sal')
-rw-r--r-- | sal/osl/unx/file.cxx | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/sal/osl/unx/file.cxx b/sal/osl/unx/file.cxx index a7eaac15e1f8..0e0e388b41fb 100644 --- a/sal/osl/unx/file.cxx +++ b/sal/osl/unx/file.cxx @@ -1110,8 +1110,7 @@ SAL_CALL osl_mapFile ( return osl_File_E_INVAL; *ppAddr = 0; - static sal_uInt64 const g_limit_size_t = std::numeric_limits< size_t >::max(); - if (g_limit_size_t < uLength) + if (uLength > SAL_MAX_SIZE) return osl_File_E_OVERFLOW; size_t const nLength = sal::static_int_cast< size_t >(uLength); @@ -1190,8 +1189,7 @@ unmapFile (void* pAddr, sal_uInt64 uLength) if (0 == pAddr) return osl_File_E_INVAL; - static sal_uInt64 const g_limit_size_t = std::numeric_limits< size_t >::max(); - if (g_limit_size_t < uLength) + if (uLength > SAL_MAX_SIZE) return osl_File_E_OVERFLOW; size_t const nLength = sal::static_int_cast< size_t >(uLength); |