summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2018-10-27 15:31:40 +0200
committerMike Kaganski <mike.kaganski@collabora.com>2018-10-27 18:00:01 +0200
commitdb7e454bf7809b57c34c90e8876a3970a004ef16 (patch)
treeb7bbf6da9600f4ffaa86823df9d92cbc38d1b200
parent48dbd2bc121764c076fdb45e5e9236126a6eec30 (diff)
tdf#120703 PVS: V668
V668 There is no sense in testing the 'pProc' pointer against null, as the memory was allocated using the 'new' operator. The exception will be generated in the case of memory allocation error. Change-Id: Iec65fd44fa947a2402da33510c29730a46c2e1a4 Reviewed-on: https://gerrit.libreoffice.org/62424 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
-rw-r--r--basic/source/comp/dim.cxx8
1 files changed, 2 insertions, 6 deletions
diff --git a/basic/source/comp/dim.cxx b/basic/source/comp/dim.cxx
index 5a3c27dd0577..3a984ce8c824 100644
--- a/basic/source/comp/dim.cxx
+++ b/basic/source/comp/dim.cxx
@@ -1215,17 +1215,13 @@ void SbiParser::DefProc( bool bStatic, bool bPrivate )
}
pDef->Match( std::unique_ptr<SbiProcDef>(pProc) );
- pProc = pDef;
}
else
{
aPublics.Add( pDef );
- pProc = pDef;
- }
- if( !pProc )
- {
- return;
}
+ assert(pDef);
+ pProc = pDef;
pProc->SetPublic( !bPrivate );
// Now we set the search hierarchy for symbols as well as the