aboutsummaryrefslogtreecommitdiff
path: root/src/prepare.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/prepare.c')
-rw-r--r--src/prepare.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/prepare.c b/src/prepare.c
index c4d88a3be..e3479f3b8 100644
--- a/src/prepare.c
+++ b/src/prepare.c
@@ -13,7 +13,7 @@
** interface, and routines that contribute to loading the database schema
** from disk.
**
-** $Id: prepare.c,v 1.115 2009/04/01 16:33:38 drh Exp $
+** $Id: prepare.c,v 1.116 2009/04/02 18:32:27 drh Exp $
*/
#include "sqliteInt.h"
@@ -528,11 +528,8 @@ static int sqlite3Prepare(
int rc = SQLITE_OK;
int i;
- assert( ppStmt );
- *ppStmt = 0;
- if( sqlite3SafetyOn(db) ){
- return SQLITE_MISUSE;
- }
+ if( sqlite3SafetyOn(db) ) return SQLITE_MISUSE;
+ assert( ppStmt && *ppStmt==0 );
assert( !db->mallocFailed );
assert( sqlite3_mutex_held(db->mutex) );
@@ -671,6 +668,8 @@ static int sqlite3LockAndPrepare(
const char **pzTail /* OUT: End of parsed string */
){
int rc;
+ assert( ppStmt!=0 );
+ *ppStmt = 0;
if( !sqlite3SafetyCheckOk(db) ){
return SQLITE_MISUSE;
}
@@ -773,6 +772,7 @@ static int sqlite3Prepare16(
const char *zTail8 = 0;
int rc = SQLITE_OK;
+ assert( ppStmt );
*ppStmt = 0;
if( !sqlite3SafetyCheckOk(db) ){
return SQLITE_MISUSE;