[Libreoffice-commits] core.git: sal/rtl

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Fri Sep 7 06:06:43 UTC 2018


 sal/rtl/byteseq.cxx |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

New commits:
commit 8cd610077dc0e436c3154cdd755795c85cef92c1
Author:     Mike Kaganski <mike.kaganski at collabora.com>
AuthorDate: Fri Sep 7 06:58:48 2018 +0200
Commit:     Mike Kaganski <mike.kaganski at collabora.com>
CommitDate: Fri Sep 7 08:06:18 2018 +0200

    Cppcheck: reduce variable scope
    
    Change-Id: I5660fe6ddc745894c1e36176f4aa38ad568f09ba
    Reviewed-on: https://gerrit.libreoffice.org/60119
    Tested-by: Jenkins
    Reviewed-by: Mike Kaganski <mike.kaganski at collabora.com>

diff --git a/sal/rtl/byteseq.cxx b/sal/rtl/byteseq.cxx
index 64f815b4d73b..c78a1e22f43a 100644
--- a/sal/rtl/byteseq.cxx
+++ b/sal/rtl/byteseq.cxx
@@ -40,14 +40,13 @@ void SAL_CALL rtl_byte_sequence_reference2One(
     sal_Sequence ** ppSequence ) SAL_THROW_EXTERN_C()
 {
     sal_Sequence * pSequence, * pNew;
-    sal_Int32 nElements;
 
     OSL_ENSURE( ppSequence, "### null ptr!" );
     pSequence = *ppSequence;
 
     if (pSequence->nRefCount > 1)
     {
-        nElements = pSequence->nElements;
+        sal_Int32 nElements = pSequence->nElements;
         if (nElements)
         {
             pNew = static_cast<sal_Sequence *>(malloc( SAL_SEQUENCE_HEADER_SIZE + nElements ));


More information about the Libreoffice-commits mailing list