summaryrefslogtreecommitdiff
path: root/sal/rtl
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2018-09-07 06:58:48 +0200
committerMike Kaganski <mike.kaganski@collabora.com>2018-09-07 08:06:18 +0200
commit8cd610077dc0e436c3154cdd755795c85cef92c1 (patch)
treea3caae62e23ea1dd1da88ab9ac6499096452451e /sal/rtl
parente7a3329fd0a68c95f00e6cdfdc3e40e6afa5411c (diff)
Cppcheck: reduce variable scope
Change-Id: I5660fe6ddc745894c1e36176f4aa38ad568f09ba Reviewed-on: https://gerrit.libreoffice.org/60119 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'sal/rtl')
-rw-r--r--sal/rtl/byteseq.cxx3
1 files changed, 1 insertions, 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<sal_Sequence *>(malloc( SAL_SEQUENCE_HEADER_SIZE + nElements ));