diff options
author | drh <drh@noemail.net> | 2016-08-24 17:49:07 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2016-08-24 17:49:07 +0000 |
commit | 321e828d035d72c80e90d82f06d413658185805a (patch) | |
tree | 5c244bc92b17c1387edbcb452c4f0c9d5cfb4272 /src/expr.c | |
parent | d0b67a8654809493d07bff62e2d9ce480be7b4df (diff) | |
download | sqlite-321e828d035d72c80e90d82f06d413658185805a.tar.gz sqlite-321e828d035d72c80e90d82f06d413658185805a.zip |
Fix more unreachable branches.
FossilOrigin-Name: 6099c180db55396d6307538a5428ae5ef1b82d10
Diffstat (limited to 'src/expr.c')
-rw-r--r-- | src/expr.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/expr.c b/src/expr.c index 37f778b29..56affdfea 100644 --- a/src/expr.c +++ b/src/expr.c @@ -542,10 +542,11 @@ static void codeVectorCompare( regLeft = exprCodeSubselect(pParse, pLeft); regRight = exprCodeSubselect(pParse, pRight); - for(i=0; i<nLeft; i++){ + for(i=0; 1 /*Loop exits by "break"*/; i++){ int regFree1 = 0, regFree2 = 0; Expr *pL, *pR; int r1, r2; + assert( i>=0 && i<nLeft ); if( i>0 ) sqlite3ExprCachePush(pParse); r1 = exprVectorRegister(pParse, pLeft, i, regLeft, &pL, ®Free1); r2 = exprVectorRegister(pParse, pRight, i, regRight, &pR, ®Free2); @@ -1490,7 +1491,9 @@ ExprList *sqlite3ExprListAppendVector( int n; int i; int iFirst = pList ? pList->nExpr : 0; - if( pColumns==0 ) goto vector_append_error; + /* pColumns can only be NULL due to an OOM but an OOM will cause an + ** exit prior to this routine being invoked */ + if( NEVER(pColumns==0) ) goto vector_append_error; if( pExpr==0 ) goto vector_append_error; n = sqlite3ExprVectorSize(pExpr); if( pColumns->nId!=n ){ |