summaryrefslogtreecommitdiff
path: root/cppu/source/uno
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-01-27 20:13:22 +0000
committerCaolán McNamara <caolanm@redhat.com>2014-01-28 11:29:15 +0000
commitba5261057cc759a9bd1e3b5fb5917dd84793d325 (patch)
tree6607c7d9ea860865fa05de026508891aa388eb72 /cppu/source/uno
parent5c734f440a685796bfca467e3d828581d747cab0 (diff)
coverity#440026 Logically dead code
Change-Id: Ib269314be090d2d65b593b1c47fea1e10ef2582b
Diffstat (limited to 'cppu/source/uno')
-rw-r--r--cppu/source/uno/copy.hxx33
1 files changed, 11 insertions, 22 deletions
diff --git a/cppu/source/uno/copy.hxx b/cppu/source/uno/copy.hxx
index ce46492bfce4..fb9adb3c2452 100644
--- a/cppu/source/uno/copy.hxx
+++ b/cppu/source/uno/copy.hxx
@@ -660,32 +660,21 @@ inline uno_Sequence * icopyConstructSequence(
{
char * pElements = pDest->elements;
void ** pSourceElements = (void **)pSource->elements;
- if (mapping)
- {
- typelib_TypeDescription * pElementTypeDescr = 0;
- TYPELIB_DANGER_GET( &pElementTypeDescr, pElementType );
- for ( sal_Int32 nPos = nElements; nPos--; )
- {
- ((void **)pElements)[nPos] = 0;
- if (((void **)pSourceElements)[nPos])
- {
- (*mapping->mapInterface)(
- mapping, (void **)pElements + nPos,
- pSourceElements[nPos],
- (typelib_InterfaceTypeDescription *)
- pElementTypeDescr );
- }
- }
- TYPELIB_DANGER_RELEASE( pElementTypeDescr );
- }
- else
+ typelib_TypeDescription * pElementTypeDescr = 0;
+ TYPELIB_DANGER_GET( &pElementTypeDescr, pElementType );
+ for ( sal_Int32 nPos = nElements; nPos--; )
{
- for ( sal_Int32 nPos = nElements; nPos--; )
+ ((void **)pElements)[nPos] = 0;
+ if (((void **)pSourceElements)[nPos])
{
- ((void **)pElements)[nPos] = pSourceElements[nPos];
- _acquire( ((void **)pElements)[nPos], acquire );
+ (*mapping->mapInterface)(
+ mapping, (void **)pElements + nPos,
+ pSourceElements[nPos],
+ (typelib_InterfaceTypeDescription *)
+ pElementTypeDescr );
}
}
+ TYPELIB_DANGER_RELEASE( pElementTypeDescr );
}
break;
}