aboutsummaryrefslogtreecommitdiff
path: root/src/os.c
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2016-02-25 18:54:30 +0000
committerdrh <drh@noemail.net>2016-02-25 18:54:30 +0000
commitd3e1af4aa04113b379050119e0015ada3078cc4e (patch)
treed12ed8d1907415a474cf321b76498befd1312fc9 /src/os.c
parent7f219fad58bb84f5e856134a7b6909c8c0482c9b (diff)
parenteecb80e77e3556e9373237eff6ab0a8dad7eb5fb (diff)
downloadsqlite-d3e1af4aa04113b379050119e0015ada3078cc4e.tar.gz
sqlite-d3e1af4aa04113b379050119e0015ada3078cc4e.zip
Merge all the latest changes from trunk.
FossilOrigin-Name: b86590043e17705ada90562cf30f69b3e3ef65a4
Diffstat (limited to 'src/os.c')
-rw-r--r--src/os.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/os.c b/src/os.c
index 90130d0eb..2fd44abf8 100644
--- a/src/os.c
+++ b/src/os.c
@@ -68,7 +68,7 @@ int sqlite3_memdebug_vfs_oom_test = 1;
#define DO_OS_MALLOC_TEST(x) \
if (sqlite3_memdebug_vfs_oom_test && (!x || !sqlite3IsMemJournal(x))) { \
void *pTstAlloc = sqlite3Malloc(10); \
- if (!pTstAlloc) return SQLITE_IOERR_NOMEM; \
+ if (!pTstAlloc) return SQLITE_IOERR_NOMEM_BKPT; \
sqlite3_free(pTstAlloc); \
}
#else
@@ -287,7 +287,7 @@ int sqlite3OsOpenMalloc(
int flags,
int *pOutFlags
){
- int rc = SQLITE_NOMEM;
+ int rc;
sqlite3_file *pFile;
pFile = (sqlite3_file *)sqlite3MallocZero(pVfs->szOsFile);
if( pFile ){
@@ -297,6 +297,8 @@ int sqlite3OsOpenMalloc(
}else{
*ppFile = pFile;
}
+ }else{
+ rc = SQLITE_NOMEM_BKPT;
}
return rc;
}
@@ -316,7 +318,7 @@ int sqlite3OsCloseFree(sqlite3_file *pFile){
*/
int sqlite3OsInit(void){
void *p = sqlite3_malloc(10);
- if( p==0 ) return SQLITE_NOMEM;
+ if( p==0 ) return SQLITE_NOMEM_BKPT;
sqlite3_free(p);
return sqlite3_os_init();
}