[Libreoffice-commits] core.git: sc/source
Michael Weghorn
m.weghorn at posteo.de
Sun Dec 14 04:22:05 PST 2014
sc/source/core/tool/address.cxx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit 3c363adcbae442d1e56409be466f4c514b89d89a
Author: Michael Weghorn <m.weghorn at posteo.de>
Date: Fri Dec 12 23:00:27 2014 +0100
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 at gmail.com>
Tested-by: Noel Grandin <noelgrandin at gmail.com>
diff --git a/sc/source/core/tool/address.cxx b/sc/source/core/tool/address.cxx
index 1efcac7..c6deace 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, "");
More information about the Libreoffice-commits
mailing list