diff options
author | drh <drh@noemail.net> | 2008-03-17 17:18:37 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2008-03-17 17:18:37 +0000 |
commit | 6c44ea48b85fde9c1a2685828b73e377d23c1ca5 (patch) | |
tree | c8b826e98733713898f74a92844a1181625632fe /src | |
parent | a53b9140863638b3fb259cb8916340b3f8ed28b0 (diff) | |
download | sqlite-6c44ea48b85fde9c1a2685828b73e377d23c1ca5.tar.gz sqlite-6c44ea48b85fde9c1a2685828b73e377d23c1ca5.zip |
Fix an uninitialized variable in the Prev and Next opcodes. (CVS 4873)
FossilOrigin-Name: fcf3d0a3d5d3a71155ab0aa5f533da72063d54f0
Diffstat (limited to 'src')
-rw-r--r-- | src/vdbe.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/vdbe.c b/src/vdbe.c index c5bbf45bd..715a50d62 100644 --- a/src/vdbe.c +++ b/src/vdbe.c @@ -43,7 +43,7 @@ ** in this file for details. If in doubt, do not deviate from existing ** commenting and indentation practices when changing or adding code. ** -** $Id: vdbe.c,v 1.710 2008/03/17 16:54:02 drh Exp $ +** $Id: vdbe.c,v 1.711 2008/03/17 17:18:38 drh Exp $ */ #include "sqliteInt.h" #include <ctype.h> @@ -3575,7 +3575,6 @@ case OP_Prev: /* jump */ case OP_Next: { /* jump */ Cursor *pC; BtCursor *pCrsr; - int res; CHECK_FOR_INTERRUPT; assert( pOp->p1>=0 && pOp->p1<p->nCursor ); @@ -3585,9 +3584,8 @@ case OP_Next: { /* jump */ } pCrsr = pC->pCursor; assert( pCrsr ); - if( pC->nullRow ){ - res = 1; - }else{ + if( pC->nullRow==0 ){ + int res = 1; assert( pC->deferredMoveto==0 ); rc = pOp->opcode==OP_Next ? sqlite3BtreeNext(pCrsr, &res) : sqlite3BtreePrevious(pCrsr, &res); |