1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-14 00:22:38 +03:00

Additional test coverage for the btree module. Remove the failsafe() macro

and replace it with ALWAYS() and NEVER(). (CVS 5395)

FossilOrigin-Name: d7e2f0d2d45574d6191c1b191c0daf5260696f27
This commit is contained in:
drh
2008-07-11 16:15:17 +00:00
parent 8278ce7910
commit 34004cebb6
13 changed files with 56 additions and 100 deletions

View File

@@ -14,7 +14,7 @@
** other files are for internal use by SQLite and should not be
** accessed by users of the library.
**
** $Id: main.c,v 1.475 2008/07/10 18:13:42 drh Exp $
** $Id: main.c,v 1.476 2008/07/11 16:15:18 drh Exp $
*/
#include "sqliteInt.h"
#include <ctype.h>
@@ -584,8 +584,7 @@ static int sqliteDefaultBusyCallback(
*/
int sqlite3InvokeBusyHandler(BusyHandler *p){
int rc;
failsafe( p==0, 0x912aaf8d, {return 0;})
if( p->xFunc==0 || p->nBusy<0 ) return 0;
if( NEVER(p==0) || p->xFunc==0 || p->nBusy<0 ) return 0;
rc = p->xFunc(p->pArg, p->nBusy);
if( rc==0 ){
p->nBusy = -1;