/ Check-in [1773eb7b]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Add a comment to vdbe.c to explain the use of an uninitialized variable. (CVS 3551)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 1773eb7badf105b0e23316d4236903049c354c71
User & Date: drh 2007-01-04 01:20:11
Context
2007-01-04
01:20
Fix for ticket #2141. (CVS 3552) check-in: 70f5f3b8 user: drh tags: trunk
01:20
Add a comment to vdbe.c to explain the use of an uninitialized variable. (CVS 3551) check-in: 1773eb7b user: drh tags: trunk
2007-01-03
23:37
Clean up memory leaks and uninitialized variables detected by valgrind. Identify all tests where we deliberately derefence freed memory by adding a "-misuse" tag. (CVS 3550) check-in: 70a86270 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/vdbe.c.

    39     39   **
    40     40   ** Various scripts scan this source file in order to generate HTML
    41     41   ** documentation, headers files, or other derived files.  The formatting
    42     42   ** of the code in this file is, therefore, important.  See other comments
    43     43   ** in this file for details.  If in doubt, do not deviate from existing
    44     44   ** commenting and indentation practices when changing or adding code.
    45     45   **
    46         -** $Id: vdbe.c,v 1.582 2007/01/02 18:41:55 drh Exp $
           46  +** $Id: vdbe.c,v 1.583 2007/01/04 01:20:11 drh Exp $
    47     47   */
    48     48   #include "sqliteInt.h"
    49     49   #include "os.h"
    50     50   #include <ctype.h>
    51     51   #include "vdbeInt.h"
    52     52   
    53     53   /*
................................................................................
  3078   3078       assert( p->apCsr[i]->isTable );
  3079   3079       iKey = intToKey(pTos->i);
  3080   3080       rc = sqlite3BtreeMoveto(pCrsr, 0, iKey, &res);
  3081   3081       pC->lastRowid = pTos->i;
  3082   3082       pC->rowidIsValid = res==0;
  3083   3083       pC->nullRow = 0;
  3084   3084       pC->cacheStatus = CACHE_STALE;
         3085  +    /* res might be uninitialized if rc!=SQLITE_OK.  But if rc!=SQLITE_OK
         3086  +    ** processing is about to abort so we really do not care whether or not
         3087  +    ** the following jump is taken. */
  3085   3088       if( res!=0 ){
  3086   3089         pc = pOp->p2 - 1;
  3087   3090         pC->rowidIsValid = 0;
  3088   3091       }
  3089   3092     }
  3090   3093     Release(pTos);
  3091   3094     pTos--;