diff options
author | drh <drh@noemail.net> | 2007-03-12 23:48:52 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2007-03-12 23:48:52 +0000 |
commit | 7f906d63ff8769b48ae22cb9fe24182a74eef8b4 (patch) | |
tree | 09a3fc71257195d3c5cdf15534b82af8a2b2c907 /src | |
parent | 280801e2d1fb0f8411efe0c5d49727e78f99f673 (diff) | |
download | sqlite-7f906d63ff8769b48ae22cb9fe24182a74eef8b4.tar.gz sqlite-7f906d63ff8769b48ae22cb9fe24182a74eef8b4.zip |
Clarify the use of loop variables in a expr.c. (CVS 3683)
FossilOrigin-Name: e20e76f6d8578f4faab0b101b6d4deb2a8987454
Diffstat (limited to 'src')
-rw-r--r-- | src/expr.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/expr.c b/src/expr.c index 6724b39a1..f5d876e3c 100644 --- a/src/expr.c +++ b/src/expr.c @@ -12,7 +12,7 @@ ** This file contains routines used for analyzing expressions and ** for generating VDBE code that evaluates expressions in SQLite. ** -** $Id: expr.c,v 1.280 2007/02/24 15:29:04 drh Exp $ +** $Id: expr.c,v 1.281 2007/03/12 23:48:53 drh Exp $ */ #include "sqliteInt.h" #include <ctype.h> @@ -2288,15 +2288,16 @@ static int analyzeAggregate(void *pArg, Expr *pExpr){ ** Make an entry for the column in pAggInfo->aCol[] if there ** is not an entry there already. */ + int k; pCol = pAggInfo->aCol; - for(i=0; i<pAggInfo->nColumn; i++, pCol++){ + for(k=0; k<pAggInfo->nColumn; k++, pCol++){ if( pCol->iTable==pExpr->iTable && pCol->iColumn==pExpr->iColumn ){ break; } } - if( i>=pAggInfo->nColumn && (i = addAggInfoColumn(pAggInfo))>=0 ){ - pCol = &pAggInfo->aCol[i]; + if( k>=pAggInfo->nColumn && (k = addAggInfoColumn(pAggInfo))>=0 ){ + pCol = &pAggInfo->aCol[k]; pCol->pTab = pExpr->pTab; pCol->iTable = pExpr->iTable; pCol->iColumn = pExpr->iColumn; @@ -2328,7 +2329,7 @@ static int analyzeAggregate(void *pArg, Expr *pExpr){ */ pExpr->pAggInfo = pAggInfo; pExpr->op = TK_AGG_COLUMN; - pExpr->iAgg = i; + pExpr->iAgg = k; break; } /* endif pExpr->iTable==pItem->iCursor */ } /* end loop over pSrcList */ |