diff options
author | Norbert Thiebaud <nthiebaud@gmail.com> | 2013-02-21 19:04:05 -0600 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-02-24 23:56:40 +0000 |
commit | bbe02c2212a24a1984c951b0d32001b54cf307a0 (patch) | |
tree | e35891ee4dbbbc349efdb6416b9cb9a1b1f7c9e4 /xmloff | |
parent | c6b795140abeb9dab00b3a149c5c8042198ac1d4 (diff) |
coverity#705444 Improper use of negative value
Change-Id: Ie3b7634e099de5c8b9a4a77daf47c6038dade370
Reviewed-on: https://gerrit.libreoffice.org/2320
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'xmloff')
-rw-r--r-- | xmloff/source/chart/SchXMLTools.cxx | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/xmloff/source/chart/SchXMLTools.cxx b/xmloff/source/chart/SchXMLTools.cxx index 5752fad35afa..9d95a61fa60c 100644 --- a/xmloff/source/chart/SchXMLTools.cxx +++ b/xmloff/source/chart/SchXMLTools.cxx @@ -96,9 +96,8 @@ sal_Int32 lcl_getBuildIDFromGenerator( const ::rtl::OUString& rGenerator ) //returns -1 if nothing found sal_Int32 nBuildId = -1; const OUString sBuildCompare( "$Build-" ); - sal_Int32 nEnd = -1; - sal_Int32 nBegin = rGenerator.indexOf( sBuildCompare, nEnd ); - if( nBegin != -1 ) + sal_Int32 nBegin = rGenerator.indexOf( sBuildCompare ); + if( nBegin >= 0 ) { OUString sBuildId( rGenerator.copy( nBegin + sBuildCompare.getLength() ) ); nBuildId = sBuildId.toInt32(); |