branches/zip: Use hash_table_clear() to initialize the array instead of

for()-loop.

Suggested by:	Sunny
Approved by:	Marko
This commit is contained in:
vasil 2007-08-23 07:01:24 +00:00
parent 7bd89c504d
commit 617cbacd07
3 changed files with 3 additions and 8 deletions

View file

@ -103,12 +103,7 @@ hash_create(
table->magic_n = HASH_TABLE_MAGIC_N;
/* Initialize the cell array */
for (i = 0; i < prime; i++) {
cell = hash_get_nth_cell(table, i);
cell->node = NULL;
}
hash_table_clear(table);
return(table);
}

View file

@ -180,7 +180,7 @@ hash_get_nth_cell(
ulint n); /* in: cell index */
/*****************************************************************
Clears a hash table so that all the cells become empty again. */
Clears a hash table so that all the cells become empty. */
UNIV_INLINE
void
hash_table_clear(

View file

@ -24,7 +24,7 @@ hash_get_nth_cell(
}
/*****************************************************************
Clears a hash table so that all the cells become empty again. */
Clears a hash table so that all the cells become empty. */
UNIV_INLINE
void
hash_table_clear(