mirror of
https://github.com/postgres/postgres.git
synced 2025-10-24 01:29:19 +03:00
Remove useless casts to (void *) in hash_search() calls
Some of these appear to be leftovers from when hash_search() took a
char * argument (changed in 5999e78fc4).
Since after this there is some more horizontal space available, do
some light reformatting where suitable.
Reviewed-by: Corey Huinker <corey.huinker@gmail.com>
Discussion: https://www.postgresql.org/message-id/flat/fd9adf5d-b1aa-e82f-e4c7-263c30145807%40enterprisedb.com
This commit is contained in:
@@ -254,7 +254,7 @@ compute_tsvector_stats(VacAttrStats *stats,
|
||||
|
||||
/* Lookup current lexeme in hashtable, adding it if new */
|
||||
item = (TrackItem *) hash_search(lexemes_tab,
|
||||
(const void *) &hash_key,
|
||||
&hash_key,
|
||||
HASH_ENTER, &found);
|
||||
|
||||
if (found)
|
||||
@@ -464,7 +464,7 @@ prune_lexemes_hashtable(HTAB *lexemes_tab, int b_current)
|
||||
{
|
||||
char *lexeme = item->key.lexeme;
|
||||
|
||||
if (hash_search(lexemes_tab, (const void *) &item->key,
|
||||
if (hash_search(lexemes_tab, &item->key,
|
||||
HASH_REMOVE, NULL) == NULL)
|
||||
elog(ERROR, "hash table corrupted");
|
||||
pfree(lexeme);
|
||||
|
||||
Reference in New Issue
Block a user