From 8cd610077dc0e436c3154cdd755795c85cef92c1 Mon Sep 17 00:00:00 2001 From: Mike Kaganski Date: Fri, 7 Sep 2018 06:58:48 +0200 Subject: Cppcheck: reduce variable scope Change-Id: I5660fe6ddc745894c1e36176f4aa38ad568f09ba Reviewed-on: https://gerrit.libreoffice.org/60119 Tested-by: Jenkins Reviewed-by: Mike Kaganski --- sal/rtl/byteseq.cxx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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(malloc( SAL_SEQUENCE_HEADER_SIZE + nElements )); -- cgit