aboutsummaryrefslogtreecommitdiff
path: root/src/expr.c
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2017-04-05 11:49:06 +0000
committerdrh <drh@noemail.net>2017-04-05 11:49:06 +0000
commitf4dd26c5a00407d0c5f5d3874b684a40cb9ab5ef (patch)
tree354c8428f3ef793002f3a505f419afffc45c6262 /src/expr.c
parent43606175e2e8fae94fa98f18353a3c335c708eb1 (diff)
downloadsqlite-f4dd26c5a00407d0c5f5d3874b684a40cb9ab5ef.tar.gz
sqlite-f4dd26c5a00407d0c5f5d3874b684a40cb9ab5ef.zip
Remove a conditional made unreachable by the previous ExprList enhancement.
FossilOrigin-Name: a1cf44763277b6c745b5b5509ca9129b6c3231608b4d1c8aec2815b64b5a2a07
Diffstat (limited to 'src/expr.c')
-rw-r--r--src/expr.c25
1 files changed, 12 insertions, 13 deletions
diff --git a/src/expr.c b/src/expr.c
index 8d935764a..20ccea787 100644
--- a/src/expr.c
+++ b/src/expr.c
@@ -1550,20 +1550,19 @@ ExprList *sqlite3ExprListAppendVector(
}
}
- if( pExpr->op==TK_SELECT ){
- if( pList && pList->a[iFirst].pExpr ){
- Expr *pFirst = pList->a[iFirst].pExpr;
- assert( pFirst->op==TK_SELECT_COLUMN );
+ if( pExpr->op==TK_SELECT && pList ){
+ Expr *pFirst = pList->a[iFirst].pExpr;
+ assert( pFirst!=0 );
+ assert( pFirst->op==TK_SELECT_COLUMN );
- /* Store the SELECT statement in pRight so it will be deleted when
- ** sqlite3ExprListDelete() is called */
- pFirst->pRight = pExpr;
- pExpr = 0;
-
- /* Remember the size of the LHS in iTable so that we can check that
- ** the RHS and LHS sizes match during code generation. */
- pFirst->iTable = pColumns->nId;
- }
+ /* Store the SELECT statement in pRight so it will be deleted when
+ ** sqlite3ExprListDelete() is called */
+ pFirst->pRight = pExpr;
+ pExpr = 0;
+
+ /* Remember the size of the LHS in iTable so that we can check that
+ ** the RHS and LHS sizes match during code generation. */
+ pFirst->iTable = pColumns->nId;
}
vector_append_error: