trafodion-codereview mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From xiaozhongwang <...@git.apache.org>
Subject [GitHub] trafodion pull request #1380: [TRAFODION-2886] fix the nullpointer error sca...
Date Thu, 11 Jan 2018 08:54:39 GMT
Github user xiaozhongwang commented on a diff in the pull request:

    https://github.com/apache/trafodion/pull/1380#discussion_r160870920
  
    --- Diff: core/sql/executor/cluster.cpp ---
    @@ -2395,7 +2395,7 @@ NABoolean Cluster::checkAndSplit(ExeErrorCode * rc)
     				         rc);
       
       if ( !next_ || *rc ) {
    -    if ( ! rc ) * rc = EXE_NO_MEM_TO_EXEC;
    +    * rc = EXE_NO_MEM_TO_EXEC;
    --- End diff --
    
    the last code is:
    if (!next_ || rc)
    if ( NULL != rc ) *rc = EXE_NO_MEM_TO_EXEC;
    
    the next line is wrong, because the condition !rc is TRUE when rc = NULL, so the *rc is
incorrect:
    if ( !rc ) *rc = EXE_NO_MEM_TO_EXEC;


---

Mime
View raw message