xmloff/source/chart/SchXMLTools.cxx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
New commits: commit bbe02c2212a24a1984c951b0d32001b54cf307a0 Author: Norbert Thiebaud <nthieb...@gmail.com> Date: Thu Feb 21 19:04:05 2013 -0600 coverity#705444 Improper use of negative value Change-Id: Ie3b7634e099de5c8b9a4a77daf47c6038dade370 Reviewed-on: https://gerrit.libreoffice.org/2320 Reviewed-by: Caolán McNamara <caol...@redhat.com> Tested-by: Caolán McNamara <caol...@redhat.com> diff --git a/xmloff/source/chart/SchXMLTools.cxx b/xmloff/source/chart/SchXMLTools.cxx index 5752fad..9d95a61 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();
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits