summaryrefslogtreecommitdiff
path: root/basic
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2016-02-15 11:26:45 +0000
committerCaolán McNamara <caolanm@redhat.com>2016-02-15 11:45:53 +0000
commit7347248254595c082682180f7a1cfe768f5509a6 (patch)
tree32b3dd0f29dc8eac83581894584bfc8ddaa31bf6 /basic
parentf3f67b770b90c81de82bc38a26e794ad72956c1a (diff)
cppcheck: unreadVariable
Change-Id: I15f0320b646d20f0093c77286c1ff2715aacb8ce
Diffstat (limited to 'basic')
-rw-r--r--basic/source/classes/sbxmod.cxx42
1 files changed, 20 insertions, 22 deletions
diff --git a/basic/source/classes/sbxmod.cxx b/basic/source/classes/sbxmod.cxx
index 1c3a23f69770..410c321666a2 100644
--- a/basic/source/classes/sbxmod.cxx
+++ b/basic/source/classes/sbxmod.cxx
@@ -1790,31 +1790,29 @@ bool SbModule::HasExeCode()
// Store only image, no source
void SbModule::StoreBinaryData( SvStream& rStrm, sal_uInt16 nVer )
{
- bool bRet = Compile();
- if( bRet )
- {
- bool bFixup = ( !nVer && !pImage->ExceedsLegacyLimits() );// save in old image format, fix up method starts
+ if (!Compile())
+ return;
+ bool bFixup = ( !nVer && !pImage->ExceedsLegacyLimits() );// save in old image format, fix up method starts
- if ( bFixup ) // save in old image format, fix up method starts
- fixUpMethodStart( true );
- bRet = SbxObject::StoreData( rStrm );
- if( bRet )
- {
- (pImage->aOUSource).clear();
- pImage->aComment = aComment;
- pImage->aName = GetName();
+ if ( bFixup ) // save in old image format, fix up method starts
+ fixUpMethodStart( true );
- rStrm.WriteUChar( 1 );
- if ( nVer )
- bRet = pImage->Save( rStrm );
- else
- bRet = pImage->Save( rStrm, B_LEGACYVERSION );
- if ( bFixup )
- fixUpMethodStart( false ); // restore method starts
+ if (!SbxObject::StoreData(rStrm))
+ return;
- pImage->aOUSource = aOUSource;
- }
- }
+ pImage->aOUSource.clear();
+ pImage->aComment = aComment;
+ pImage->aName = GetName();
+
+ rStrm.WriteUChar(1);
+ if (nVer)
+ pImage->Save(rStrm);
+ else
+ pImage->Save(rStrm, B_LEGACYVERSION);
+ if (bFixup)
+ fixUpMethodStart(false); // restore method starts
+
+ pImage->aOUSource = aOUSource;
}
// Called for >= OO 1.0 passwd protected libraries only