Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(920)

Unified Diff: third_party/sqlite/src/ext/async/sqlite3async.c

Issue 1610963002: Import SQLite 3.10.2. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/sqlite/src/configure.ac ('k') | third_party/sqlite/src/ext/fts1/fts1.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/sqlite/src/ext/async/sqlite3async.c
diff --git a/third_party/sqlite/src/ext/async/sqlite3async.c b/third_party/sqlite/src/ext/async/sqlite3async.c
index 4ab39cac351ace28e1f59e7ceeb3bc570234e655..b6f4a4bd36b10aa4ebb7605661bdca411cbfad25 100644
--- a/third_party/sqlite/src/ext/async/sqlite3async.c
+++ b/third_party/sqlite/src/ext/async/sqlite3async.c
@@ -1636,6 +1636,7 @@ void sqlite3async_run(void){
** Control/configure the asynchronous IO system.
*/
int sqlite3async_control(int op, ...){
+ int rc = SQLITE_OK;
va_list ap;
va_start(ap, op);
switch( op ){
@@ -1645,7 +1646,8 @@ int sqlite3async_control(int op, ...){
&& eWhen!=SQLITEASYNC_HALT_NOW
&& eWhen!=SQLITEASYNC_HALT_IDLE
){
- return SQLITE_MISUSE;
+ rc = SQLITE_MISUSE;
+ break;
}
async.eHalt = eWhen;
async_mutex_enter(ASYNC_MUTEX_QUEUE);
@@ -1657,7 +1659,8 @@ int sqlite3async_control(int op, ...){
case SQLITEASYNC_DELAY: {
int iDelay = va_arg(ap, int);
if( iDelay<0 ){
- return SQLITE_MISUSE;
+ rc = SQLITE_MISUSE;
+ break;
}
async.ioDelay = iDelay;
break;
@@ -1668,7 +1671,8 @@ int sqlite3async_control(int op, ...){
async_mutex_enter(ASYNC_MUTEX_QUEUE);
if( async.nFile || async.pQueueFirst ){
async_mutex_leave(ASYNC_MUTEX_QUEUE);
- return SQLITE_MISUSE;
+ rc = SQLITE_MISUSE;
+ break;
}
async.bLockFiles = bLock;
async_mutex_leave(ASYNC_MUTEX_QUEUE);
@@ -1692,9 +1696,11 @@ int sqlite3async_control(int op, ...){
}
default:
- return SQLITE_ERROR;
+ rc = SQLITE_ERROR;
+ break;
}
- return SQLITE_OK;
+ va_end(ap);
+ return rc;
}
#endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_ASYNCIO) */
« no previous file with comments | « third_party/sqlite/src/configure.ac ('k') | third_party/sqlite/src/ext/fts1/fts1.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698