mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-05 15:55:57 +03:00
Add function sqlite3OsFileControlNoFail(), which is the same as sqlite3OsFileControl() except that it does not simulate OOM errors. This saves adding calls to the BenignMalloc() functions around each of the invocations of sqliteOsFileControl() that ignore the return code.
FossilOrigin-Name: af59b182d797642e5ec3ddf291cf62662a136bd1
This commit is contained in:
5
src/os.c
5
src/os.c
@@ -101,6 +101,11 @@ int sqlite3OsFileControl(sqlite3_file *id, int op, void *pArg){
|
||||
DO_OS_MALLOC_TEST(id);
|
||||
return id->pMethods->xFileControl(id, op, pArg);
|
||||
}
|
||||
#ifdef SQLITE_TEST
|
||||
int sqlite3OsFileControlNoFail(sqlite3_file *id, int op, void *pArg){
|
||||
return id->pMethods->xFileControl(id, op, pArg);
|
||||
}
|
||||
#endif
|
||||
int sqlite3OsSectorSize(sqlite3_file *id){
|
||||
int (*xSectorSize)(sqlite3_file*) = id->pMethods->xSectorSize;
|
||||
return (xSectorSize ? xSectorSize(id) : SQLITE_DEFAULT_SECTOR_SIZE);
|
||||
|
Reference in New Issue
Block a user