summaryrefslogtreecommitdiff
path: root/i18npool
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2018-12-24 08:24:26 +0300
committerMike Kaganski <mike.kaganski@collabora.com>2018-12-24 07:45:56 +0100
commit5bbe79272ee91bd4c93064e75b7a403025cf5212 (patch)
treef7c8f6340df405712a327e3fca66d32dbe90d95d /i18npool
parentff66e912c4019c9d6320eeef4d75f265cd878d01 (diff)
tdf#120703 PVS: V560 A part of conditional expression is always true/false
Change-Id: I5ca32214bab4b26208aecaa98eecc2a6297d9093 Reviewed-on: https://gerrit.libreoffice.org/65592 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'i18npool')
-rw-r--r--i18npool/source/search/textsearch.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/i18npool/source/search/textsearch.cxx b/i18npool/source/search/textsearch.cxx
index 10b58ba3ea6c..8ec461c5dd46 100644
--- a/i18npool/source/search/textsearch.cxx
+++ b/i18npool/source/search/textsearch.cxx
@@ -1128,7 +1128,7 @@ SearchResult TextSearch::WildcardSrchFrwrd( const OUString& searchStr, sal_Int32
// Forward nStartPos inclusive, nEndPos exclusive, but allow for empty
// string match with [0,0).
- if (nStartPos < 0 || nEndPos > nStringLen || nEndPos < nStartPos || nStartPos > nStringLen ||
+ if (nStartPos < 0 || nEndPos > nStringLen || nEndPos < nStartPos ||
(nStartPos == nStringLen && (nStringLen != 0 || nStartPos != nEndPos)))
return aRes;
@@ -1300,7 +1300,7 @@ SearchResult TextSearch::WildcardSrchBkwrd( const OUString& searchStr, sal_Int32
// Backward nStartPos exclusive, nEndPos inclusive, but allow for empty
// string match with (0,0].
- if (nStartPos > nStringLen || nEndPos < 0 || nStartPos < nEndPos || nEndPos > nStringLen ||
+ if (nStartPos > nStringLen || nEndPos < 0 || nStartPos < nEndPos ||
(nEndPos == nStringLen && (nStringLen != 0 || nStartPos != nEndPos)))
return aRes;