diff options
Diffstat (limited to 'src/hash.c')
-rw-r--r-- | src/hash.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/hash.c b/src/hash.c index 8b3543527..b8d0af629 100644 --- a/src/hash.c +++ b/src/hash.c @@ -12,7 +12,7 @@ ** This is the implementation of generic hash-tables ** used in SQLite. ** -** $Id: hash.c,v 1.27 2008/04/02 18:33:08 drh Exp $ +** $Id: hash.c,v 1.28 2008/05/13 13:27:34 drh Exp $ */ #include "sqliteInt.h" #include <assert.h> @@ -233,9 +233,9 @@ static void rehash(Hash *pH, int new_size){ ** is benign (since failing to resize a hash table is a performance ** hit only, not a fatal error). */ - sqlite3FaultBenign(SQLITE_FAULTINJECTOR_MALLOC, pH->htsize>0); + if( pH->htsize>0 ) sqlite3FaultBeginBenign(SQLITE_FAULTINJECTOR_MALLOC); new_ht = (struct _ht *)sqlite3MallocZero( new_size*sizeof(struct _ht) ); - sqlite3FaultBenign(SQLITE_FAULTINJECTOR_MALLOC, 0); + if( pH->htsize>0 ) sqlite3FaultEndBenign(SQLITE_FAULTINJECTOR_MALLOC); if( new_ht==0 ) return; sqlite3_free(pH->ht); |