1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-16 23:02:26 +03:00

Minor optimizations. (CVS 4955)

FossilOrigin-Name: e8529455803e0dab167f4faba5846fa1eafef741
This commit is contained in:
drh
2008-04-02 18:33:07 +00:00
parent 6a9ad3da22
commit 41eb9e9986
4 changed files with 18 additions and 17 deletions

View File

@@ -12,7 +12,7 @@
** This is the implementation of generic hash-tables
** used in SQLite.
**
** $Id: hash.c,v 1.26 2008/02/18 22:24:58 drh Exp $
** $Id: hash.c,v 1.27 2008/04/02 18:33:08 drh Exp $
*/
#include "sqliteInt.h"
#include <assert.h>
@@ -53,7 +53,7 @@ void sqlite3HashClear(Hash *pH){
assert( pH!=0 );
elem = pH->first;
pH->first = 0;
if( pH->ht ) sqlite3_free(pH->ht);
sqlite3_free(pH->ht);
pH->ht = 0;
pH->htsize = 0;
while( elem ){
@@ -238,7 +238,7 @@ static void rehash(Hash *pH, int new_size){
sqlite3FaultBenign(SQLITE_FAULTINJECTOR_MALLOC, 0);
if( new_ht==0 ) return;
if( pH->ht ) sqlite3_free(pH->ht);
sqlite3_free(pH->ht);
pH->ht = new_ht;
pH->htsize = new_size;
xHash = hashFunction(pH->keyClass);