aboutsummaryrefslogtreecommitdiff
path: root/src/expr.c
diff options
context:
space:
mode:
authordanielk1977 <danielk1977@noemail.net>2002-05-19 23:43:12 +0000
committerdanielk1977 <danielk1977@noemail.net>2002-05-19 23:43:12 +0000
commitf29ce5595883df5c035b5c6b97bf07f73eef5bc5 (patch)
tree9a54fde3d95357d73c85bc8e333a91549db8ea9a /src/expr.c
parent633ed08d95f02015d785b51d916ed27de1d84c91 (diff)
downloadsqlite-f29ce5595883df5c035b5c6b97bf07f73eef5bc5.tar.gz
sqlite-f29ce5595883df5c035b5c6b97bf07f73eef5bc5.zip
Style fixes to triggers code in various *.c files (partial fix to ticket #39) (CVS 571)
FossilOrigin-Name: 8a4195c7466962291a296e8f53034ea8cb25005f
Diffstat (limited to 'src/expr.c')
-rw-r--r--src/expr.c23
1 files changed, 12 insertions, 11 deletions
diff --git a/src/expr.c b/src/expr.c
index b41e0ad8c..008693efa 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.59 2002/05/15 08:30:13 danielk1977 Exp $
+** $Id: expr.c,v 1.60 2002/05/19 23:43:14 danielk1977 Exp $
*/
#include "sqliteInt.h"
@@ -484,28 +484,29 @@ int sqliteExprResolveIds(
/* If we have not already resolved this *.* expression, then maybe
* it is a new.* or old.* trigger argument reference */
- if (cnt == 0 && pParse->trigStack != 0) {
- TriggerStack * tt = pParse->trigStack;
- int j;
+ if( cnt == 0 && pParse->trigStack != 0 ){
+ TriggerStack *pTriggerStack = pParse->trigStack;
int t = 0;
- if (tt->newIdx != -1 && sqliteStrICmp("new", zLeft) == 0) {
- pExpr->iTable = tt->newIdx;
+ if( pTriggerStack->newIdx != -1 && sqliteStrICmp("new", zLeft) == 0 ){
+ pExpr->iTable = pTriggerStack->newIdx;
cntTab++;
t = 1;
}
- if (tt->oldIdx != -1 && sqliteStrICmp("old", zLeft) == 0) {
- pExpr->iTable = tt->oldIdx;
+ if( pTriggerStack->oldIdx != -1 && sqliteStrICmp("old", zLeft) == 0 ){
+ pExpr->iTable = pTriggerStack->oldIdx;
cntTab++;
t = 1;
}
- if (t)
- for(j=0; j<tt->pTab->nCol; j++) {
- if( sqliteStrICmp(tt->pTab->aCol[j].zName, zRight)==0 ){
+ if( t ){
+ int j;
+ for(j=0; j < pTriggerStack->pTab->nCol; j++) {
+ if( sqliteStrICmp(pTriggerStack->pTab->aCol[j].zName, zRight)==0 ){
cnt++;
pExpr->iColumn = j;
}
}
+ }
}
if( cnt==0 && cntTab==1 && sqliteIsRowid(zRight) ){