mirror of
https://github.com/MariaDB/server.git
synced 2025-01-18 04:53:01 +01:00
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:
parent
7bd89c504d
commit
617cbacd07
3 changed files with 3 additions and 8 deletions
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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(
|
||||
|
|
|
@ -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(
|
||||
|
|
Loading…
Reference in a new issue