basic/source/comp/io.cxx |    5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

New commits:
commit 3d0559e4b8b674cb9a63239b0f28fd23b1dd76bb
Author:     Mike Kaganski <mike.kagan...@collabora.com>
AuthorDate: Sun Oct 21 10:03:59 2018 +0200
Commit:     Mike Kaganski <mike.kagan...@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.kagan...@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;
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to