1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-07 02:42:48 +03:00

Since the return value of sqlite3OsClose() is always ignored, we might as

well make it "void" instead of "int", and thereby save 50 bytes in the
compiled binary.

FossilOrigin-Name: 7ee570e7a9a2159a8c0d41805c00f91ca0de00e3
This commit is contained in:
drh
2016-04-14 13:16:58 +00:00
parent 7512cb47e8
commit 8f2ce91462
7 changed files with 23 additions and 26 deletions

View File

@@ -81,13 +81,11 @@ int sqlite3_memdebug_vfs_oom_test = 1;
** of this would be completely automatic if SQLite were coded using
** C++ instead of plain old C.
*/
int sqlite3OsClose(sqlite3_file *pId){
int rc = SQLITE_OK;
void sqlite3OsClose(sqlite3_file *pId){
if( pId->pMethods ){
rc = pId->pMethods->xClose(pId);
pId->pMethods->xClose(pId);
pId->pMethods = 0;
}
return rc;
}
int sqlite3OsRead(sqlite3_file *id, void *pBuf, int amt, i64 offset){
DO_OS_MALLOC_TEST(id);
@@ -305,12 +303,10 @@ int sqlite3OsOpenMalloc(
}
return rc;
}
int sqlite3OsCloseFree(sqlite3_file *pFile){
int rc = SQLITE_OK;
void sqlite3OsCloseFree(sqlite3_file *pFile){
assert( pFile );
rc = sqlite3OsClose(pFile);
sqlite3OsClose(pFile);
sqlite3_free(pFile);
return rc;
}
/*