[Libreoffice-commits] core.git: basic/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Sun Oct 21 10:27:02 UTC 2018
basic/source/comp/io.cxx | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
New commits:
commit 3d0559e4b8b674cb9a63239b0f28fd23b1dd76bb
Author: Mike Kaganski <mike.kaganski at collabora.com>
AuthorDate: Sun Oct 21 10:03:59 2018 +0200
Commit: Mike Kaganski <mike.kaganski at collabora.com>
CommitDate: Sun Oct 21 12:26:39 2018 +0200
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: Mike Kaganski <mike.kaganski at collabora.com>
diff --git a/basic/source/comp/io.cxx b/basic/source/comp/io.cxx
index 595b0c95bc61..988e56031a3e 100644
--- a/basic/source/comp/io.cxx
+++ b/basic/source/comp/io.cxx
@@ -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;
More information about the Libreoffice-commits
mailing list