summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Weghorn <m.weghorn@posteo.de>2014-12-12 23:00:27 +0100
committerNoel Grandin <noelgrandin@gmail.com>2014-12-14 12:21:34 +0000
commit3c363adcbae442d1e56409be466f4c514b89d89a (patch)
tree7b8e7619d472ba5d6cca9d3ba12126e1e20039c8
parentc70d907c6bac7720338207355e41724ba1e97781 (diff)
fdo#39440 eliminate redundant condition
addresses the following cppcheck "redundantCondition" warning: "Redundant condition: If n > 0, the comparison n != -1 is always true." Change-Id: I879b1e3a07b56560dd635a399b6079f9bd2f9590 Reviewed-on: https://gerrit.libreoffice.org/13461 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
-rw-r--r--sc/source/core/tool/address.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/sc/source/core/tool/address.cxx b/sc/source/core/tool/address.cxx
index 1efcac723c3f..c6deace9fe2e 100644
--- a/sc/source/core/tool/address.cxx
+++ b/sc/source/core/tool/address.cxx
@@ -1106,7 +1106,7 @@ static sal_uInt16 lcl_ScAddress_Parse_OOo( const sal_Unicode* p, ScDocument* pDo
// Specified table name is not found in this document. Assume this is an external document.
aDocName = aTab;
sal_Int32 n = aDocName.lastIndexOf('.');
- if (n != -1 && n > 0)
+ if (n > 0)
{
// Extension found. Strip it.
aTab = aTab.replaceAt(n, 1, "");