Kaydet (Commit) 3d0559e4 authored tarafından Mike Kaganski's avatar Mike Kaganski

tdf#120703 (PVS): redundant nullptr check

V668 There is no sense in testing the 'pChan' 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: I1cb78c27da753525f05de2d3a0b74c894b07528e
Reviewed-on: https://gerrit.libreoffice.org/62124
Tested-by: Jenkins
Reviewed-by: 's avatarMike Kaganski <mike.kaganski@collabora.com>
üst c0dcf426
......@@ -236,8 +236,6 @@ void SbiParser::Open()
TestToken( AS );
// channel number
std::unique_ptr<SbiExpression> pChan(new SbiExpression( this ));
if( !pChan )
Error( ERRCODE_BASIC_SYNTAX );
std::unique_ptr<SbiExpression> pLen;
if( Peek() == SYMBOL )
{
......@@ -254,8 +252,7 @@ void SbiParser::Open()
// channel number
// file name
pLen->Gen();
if( pChan )
pChan->Gen();
pChan->Gen();
aFileName.Gen();
aGen.Gen( SbiOpcode::OPEN_, static_cast<sal_uInt32>(nMode), static_cast<sal_uInt32>(nFlags) );
bInStatement = false;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment