mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-07 02:42:48 +03:00
Modify the sqlite3OsFileControl() interface to detect unopened sqlite3_file
objects and return SQLITE_NOTFOUND. FossilOrigin-Name: 1fc72b707d4f4df049c19b023ae3f70cb45d6a6768bb68efc519cfdcd2d2ecda
This commit is contained in:
3
src/os.c
3
src/os.c
@@ -142,10 +142,11 @@ int sqlite3OsFileControl(sqlite3_file *id, int op, void *pArg){
|
||||
DO_OS_MALLOC_TEST(id);
|
||||
}
|
||||
#endif
|
||||
if( id->pMethods==0 ) return SQLITE_NOTFOUND;
|
||||
return id->pMethods->xFileControl(id, op, pArg);
|
||||
}
|
||||
void sqlite3OsFileControlHint(sqlite3_file *id, int op, void *pArg){
|
||||
(void)id->pMethods->xFileControl(id, op, pArg);
|
||||
if( id->pMethods ) (void)id->pMethods->xFileControl(id, op, pArg);
|
||||
}
|
||||
|
||||
int sqlite3OsSectorSize(sqlite3_file *id){
|
||||
|
Reference in New Issue
Block a user