diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/alter.c | 8 | ||||
-rw-r--r-- | src/btree.c | 8 | ||||
-rw-r--r-- | src/callback.c | 4 | ||||
-rw-r--r-- | src/main.c | 6 | ||||
-rw-r--r-- | src/os_unix.c | 2 | ||||
-rw-r--r-- | src/sqlite.h.in | 4 | ||||
-rw-r--r-- | src/util.c | 4 | ||||
-rw-r--r-- | src/vdbe.c | 4 |
8 files changed, 18 insertions, 22 deletions
diff --git a/src/alter.c b/src/alter.c index eba01e296..ff02c5dfc 100644 --- a/src/alter.c +++ b/src/alter.c @@ -12,7 +12,7 @@ ** This file contains C code routines that used to generate VDBE code ** that implements the ALTER TABLE command. ** -** $Id: alter.c,v 1.8 2005/08/19 19:14:13 drh Exp $ +** $Id: alter.c,v 1.9 2005/10/20 07:28:18 drh Exp $ */ #include "sqliteInt.h" #include <ctype.h> @@ -233,7 +233,7 @@ static void reloadTableSchema(Parse *pParse, Table *pTab, const char *zName){ /* Now, if the table is not stored in the temp database, reload any temp ** triggers. Don't use IN(...) in case SQLITE_OMIT_SUBQUERY is defined. */ - if( (zWhere=whereTempTriggers(pParse, pTab)) ){ + if( (zWhere=whereTempTriggers(pParse, pTab))!=0 ){ sqlite3VdbeOp3(v, OP_ParseSchema, 1, 0, zWhere, P3_DYNAMIC); } #endif @@ -349,7 +349,7 @@ void sqlite3AlterRenameTable( ** table. Don't do this if the table being ALTERed is itself located in ** the temp database. */ - if( (zWhere=whereTempTriggers(pParse, pTab)) ){ + if( (zWhere=whereTempTriggers(pParse, pTab))!=0 ){ sqlite3NestedParse(pParse, "UPDATE sqlite_temp_master SET " "sql = sqlite_rename_trigger(sql, %Q), " @@ -462,7 +462,7 @@ void sqlite3AlterFinishAddColumn(Parse *pParse, Token *pColDef){ ** format to 2. If the default value of the new column is not NULL, ** the file format becomes 3. */ - if( (v=sqlite3GetVdbe(pParse)) ){ + if( (v=sqlite3GetVdbe(pParse))!=0 ){ int f = (pDflt?3:2); /* Only set the file format to $f if it is currently less than $f. */ diff --git a/src/btree.c b/src/btree.c index 7b9cde7cf..02a641b43 100644 --- a/src/btree.c +++ b/src/btree.c @@ -9,7 +9,7 @@ ** May you share freely, never taking more than you give. ** ************************************************************************* -** $Id: btree.c,v 1.269 2005/09/17 15:20:27 drh Exp $ +** $Id: btree.c,v 1.270 2005/10/20 07:28:18 drh Exp $ ** ** This file implements a external (disk-based) database using BTrees. ** For a detailed discussion of BTrees, refer to @@ -3796,7 +3796,6 @@ static int balance_nonroot(MemPage *pPage){ MemPage *apCopy[NB]; /* Private copies of apOld[] pages */ MemPage *apNew[NB+2]; /* pPage and up to NB siblings after balancing */ Pgno pgnoNew[NB+2]; /* Page numbers for each page in apNew[] */ - int idxDiv[NB]; /* Indices of divider cells in pParent */ u8 *apDiv[NB]; /* Divider cells in pParent */ int cntNew[NB+2]; /* Index in aCell[] of cell after i-th page */ int szNew[NB+2]; /* Combined size of cells place on i-th page */ @@ -3888,7 +3887,6 @@ static int balance_nonroot(MemPage *pPage){ nDiv = 0; for(i=0, k=nxDiv; i<NB; i++, k++){ if( k<pParent->nCell ){ - idxDiv[i] = k; apDiv[i] = findCell(pParent, k); nDiv++; assert( !pParent->leaf ); @@ -5474,7 +5472,6 @@ static int checkTreePage( int hdr, cellStart; int nCell; u8 *data; - BtCursor cur; Btree *pBt; int usableSize; char zContext[100]; @@ -5484,7 +5481,7 @@ static int checkTreePage( /* Check that the page exists */ - cur.pBt = pBt = pCheck->pBt; + pBt = pCheck->pBt; usableSize = pBt->usableSize; if( iPage==0 ) return 0; if( checkRef(pCheck, iPage, zParentContext) ) return 0; @@ -5502,7 +5499,6 @@ static int checkTreePage( /* Check out all the cells. */ depth = 0; - cur.pPage = pPage; for(i=0; i<pPage->nCell; i++){ u8 *pCell; int sz; diff --git a/src/callback.c b/src/callback.c index 8b585a11f..7884a8167 100644 --- a/src/callback.c +++ b/src/callback.c @@ -13,7 +13,7 @@ ** This file contains functions used to access the internal hash tables ** of user defined functions and collation sequences. ** -** $Id: callback.c,v 1.3 2005/08/14 01:20:38 drh Exp $ +** $Id: callback.c,v 1.4 2005/10/20 07:28:18 drh Exp $ */ #include "sqliteInt.h" @@ -286,7 +286,7 @@ FuncDef *sqlite3FindFunction( ** new entry to the hash table and return it. */ if( createFlag && bestmatch<6 && - (pBest = sqliteMalloc(sizeof(*pBest)+nName)) ){ + (pBest = sqliteMalloc(sizeof(*pBest)+nName))!=0 ){ pBest->nArg = nArg; pBest->pNext = pFirst; pBest->iPrefEnc = enc; diff --git a/src/main.c b/src/main.c index d3928fd4f..192b5e200 100644 --- a/src/main.c +++ b/src/main.c @@ -14,7 +14,7 @@ ** other files are for internal use by SQLite and should not be ** accessed by users of the library. ** -** $Id: main.c,v 1.302 2005/09/17 15:20:27 drh Exp $ +** $Id: main.c,v 1.303 2005/10/20 07:28:18 drh Exp $ */ #include "sqliteInt.h" #include "os.h" @@ -741,7 +741,7 @@ static int openDatabase( */ if( sqlite3_create_collation(db, "BINARY", SQLITE_UTF8, 0,binCollFunc) || sqlite3_create_collation(db, "BINARY", SQLITE_UTF16, 0,binCollFunc) || - !(db->pDfltColl = sqlite3FindCollSeq(db, db->enc, "BINARY", 6, 0)) ){ + (db->pDfltColl = sqlite3FindCollSeq(db, db->enc, "BINARY", 6, 0))==0 ){ rc = db->errCode; assert( rc!=SQLITE_OK ); db->magic = SQLITE_MAGIC_CLOSED; @@ -1020,7 +1020,7 @@ int sqlite3_global_recover(){ sqlite3ExpirePreparedStatements(db); for(i=0; i<db->nDb; i++){ Btree *pBt = db->aDb[i].pBt; - if( pBt && (rc=sqlite3BtreeReset(pBt)) ){ + if( pBt && (rc=sqlite3BtreeReset(pBt))!=0 ){ goto recover_out; } } diff --git a/src/os_unix.c b/src/os_unix.c index 3e7a7b153..270d39888 100644 --- a/src/os_unix.c +++ b/src/os_unix.c @@ -202,7 +202,7 @@ struct lockKey { dev_t dev; /* Device number */ ino_t ino; /* Inode number */ #ifdef SQLITE_UNIX_THREADS - pthread_t tid; /* Thread ID or zero if threads cannot override each other */ + pthread_t tid; /* Thread ID or zero if threads can override each other */ #endif }; diff --git a/src/sqlite.h.in b/src/sqlite.h.in index 5b0ead4be..c07876ce7 100644 --- a/src/sqlite.h.in +++ b/src/sqlite.h.in @@ -12,7 +12,7 @@ ** This header file defines the interface that the SQLite library ** presents to client programs. ** -** @(#) $Id: sqlite.h.in,v 1.142 2005/10/13 02:09:50 drh Exp $ +** @(#) $Id: sqlite.h.in,v 1.143 2005/10/20 07:28:19 drh Exp $ */ #ifndef _SQLITE3_H_ #define _SQLITE3_H_ @@ -1258,7 +1258,7 @@ extern char *sqlite3_temp_directory; ** This functionality can be omitted from a build by defining the ** SQLITE_OMIT_GLOBALRECOVER at compile time. */ -int sqlite3_global_recover(); +int sqlite3_global_recover(void); /* ** Test to see whether or not the database connection is in autocommit diff --git a/src/util.c b/src/util.c index 160123444..53b977384 100644 --- a/src/util.c +++ b/src/util.c @@ -14,7 +14,7 @@ ** This file contains functions for allocating memory, comparing ** strings, and stuff like that. ** -** $Id: util.c,v 1.147 2005/10/13 02:09:50 drh Exp $ +** $Id: util.c,v 1.148 2005/10/20 07:28:19 drh Exp $ */ #include "sqliteInt.h" #include <stdarg.h> @@ -440,7 +440,7 @@ void sqlite3SetString(char **pz, ...){ ** to NULL. */ void sqlite3Error(sqlite3 *db, int err_code, const char *zFormat, ...){ - if( db && (db->pErr || (db->pErr = sqlite3ValueNew())) ){ + if( db && (db->pErr || (db->pErr = sqlite3ValueNew()))!=0 ){ db->errCode = err_code; if( zFormat ){ char *z; diff --git a/src/vdbe.c b/src/vdbe.c index a10f1a248..2bb56e4af 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.492 2005/10/06 16:53:16 drh Exp $ +** $Id: vdbe.c,v 1.493 2005/10/20 07:28:19 drh Exp $ */ #include "sqliteInt.h" #include "os.h" @@ -2248,7 +2248,7 @@ case OP_MakeRecord: { case OP_Statement: { /* no-push */ int i = pOp->p1; Btree *pBt; - if( i>=0 && i<db->nDb && (pBt = db->aDb[i].pBt) && !(db->autoCommit) ){ + if( i>=0 && i<db->nDb && (pBt = db->aDb[i].pBt)!=0 && !(db->autoCommit) ){ assert( sqlite3BtreeIsInTrans(pBt) ); if( !sqlite3BtreeIsInStmt(pBt) ){ rc = sqlite3BtreeBeginStmt(pBt); |