mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-07 02:42:48 +03:00
Move error simulation code from the sqlite3_os_init() functions into a wrapper.
FossilOrigin-Name: 67ad21abf88abb7a3e2eacddcaf1ab5d54149807
This commit is contained in:
11
src/os.c
11
src/os.c
@@ -190,6 +190,17 @@ int sqlite3OsCloseFree(sqlite3_file *pFile){
|
||||
return rc;
|
||||
}
|
||||
|
||||
/*
|
||||
** This function is a wrapper around the OS specific implementation of
|
||||
** sqlite3_os_init(). The purpose of the wrapper is to provide the
|
||||
** ability to simulate a malloc failure, so that the handling of an
|
||||
** error in sqlite3_os_init() by the upper layers can be tested.
|
||||
*/
|
||||
int sqlite3OsInit(void){
|
||||
DO_OS_MALLOC_TEST(0);
|
||||
return sqlite3_os_init();
|
||||
}
|
||||
|
||||
/*
|
||||
** The list of all registered VFS implementations.
|
||||
*/
|
||||
|
Reference in New Issue
Block a user