aboutsummaryrefslogtreecommitdiff
path: root/src/expr.c
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2019-09-23 12:38:10 +0000
committerdrh <drh@noemail.net>2019-09-23 12:38:10 +0000
commit5776ee5cf5773f4e4580db3860fe7d9194c75151 (patch)
treec28a32513fae96a89aa28e09c5dfff9ebb8611ce /src/expr.c
parent7ca1347f59d33015047fad6ca2cf878f2488eb22 (diff)
downloadsqlite-5776ee5cf5773f4e4580db3860fe7d9194c75151.tar.gz
sqlite-5776ee5cf5773f4e4580db3860fe7d9194c75151.zip
Omit the sqlite3IntTokens array constant for a code simplification.
FossilOrigin-Name: f907395ef5a2dc1d084b6a286af00de4c742cf12d4f347c21e1b757786508f57
Diffstat (limited to 'src/expr.c')
-rw-r--r--src/expr.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/expr.c b/src/expr.c
index 9310f0003..43f20d876 100644
--- a/src/expr.c
+++ b/src/expr.c
@@ -905,7 +905,7 @@ Expr *sqlite3ExprAnd(Parse *pParse, Expr *pLeft, Expr *pRight){
}else if( ExprAlwaysFalse(pLeft) || ExprAlwaysFalse(pRight) ){
sqlite3ExprUnmapAndDelete(pParse, pLeft);
sqlite3ExprUnmapAndDelete(pParse, pRight);
- return sqlite3ExprAlloc(db, TK_INTEGER, &sqlite3IntTokens[0], 0);
+ return sqlite3Expr(db, TK_INTEGER, "0");
}else{
return sqlite3PExpr(pParse, TK_AND, pLeft, pRight);
}
@@ -2963,7 +2963,7 @@ int sqlite3CodeSubselect(Parse *pParse, Expr *pExpr){
/* The subquery already has a limit. If the pre-existing limit is X
** then make the new limit X<>0 so that the new limit is either 1 or 0 */
sqlite3 *db = pParse->db;
- pLimit = sqlite3ExprAlloc(db, TK_INTEGER, &sqlite3IntTokens[0], 0);
+ pLimit = sqlite3Expr(db, TK_INTEGER, "0");
if( pLimit ){
pLimit->affExpr = SQLITE_AFF_NUMERIC;
pLimit = sqlite3PExpr(pParse, TK_NE,
@@ -2973,7 +2973,7 @@ int sqlite3CodeSubselect(Parse *pParse, Expr *pExpr){
pSel->pLimit->pLeft = pLimit;
}else{
/* If there is no pre-existing limit add a limit of 1 */
- pLimit = sqlite3ExprAlloc(pParse->db, TK_INTEGER, &sqlite3IntTokens[1], 0);
+ pLimit = sqlite3Expr(pParse->db, TK_INTEGER, "1");
pSel->pLimit = sqlite3PExpr(pParse, TK_LIMIT, pLimit, 0);
}
pSel->iLimit = 0;