mirror of
https://github.com/postgres/postgres.git
synced 2025-11-04 20:11:56 +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:
14
src/backend/utils/cache/ts_cache.c
vendored
14
src/backend/utils/cache/ts_cache.c
vendored
@@ -139,7 +139,7 @@ lookup_ts_parser_cache(Oid prsId)
|
||||
|
||||
/* Try to look up an existing entry */
|
||||
entry = (TSParserCacheEntry *) hash_search(TSParserCacheHash,
|
||||
(void *) &prsId,
|
||||
&prsId,
|
||||
HASH_FIND, NULL);
|
||||
if (entry == NULL || !entry->isvalid)
|
||||
{
|
||||
@@ -172,9 +172,7 @@ lookup_ts_parser_cache(Oid prsId)
|
||||
|
||||
/* Now make the cache entry */
|
||||
entry = (TSParserCacheEntry *)
|
||||
hash_search(TSParserCacheHash,
|
||||
(void *) &prsId,
|
||||
HASH_ENTER, &found);
|
||||
hash_search(TSParserCacheHash, &prsId, HASH_ENTER, &found);
|
||||
Assert(!found); /* it wasn't there a moment ago */
|
||||
}
|
||||
|
||||
@@ -238,7 +236,7 @@ lookup_ts_dictionary_cache(Oid dictId)
|
||||
|
||||
/* Try to look up an existing entry */
|
||||
entry = (TSDictionaryCacheEntry *) hash_search(TSDictionaryCacheHash,
|
||||
(void *) &dictId,
|
||||
&dictId,
|
||||
HASH_FIND, NULL);
|
||||
if (entry == NULL || !entry->isvalid)
|
||||
{
|
||||
@@ -288,7 +286,7 @@ lookup_ts_dictionary_cache(Oid dictId)
|
||||
/* Now make the cache entry */
|
||||
entry = (TSDictionaryCacheEntry *)
|
||||
hash_search(TSDictionaryCacheHash,
|
||||
(void *) &dictId,
|
||||
&dictId,
|
||||
HASH_ENTER, &found);
|
||||
Assert(!found); /* it wasn't there a moment ago */
|
||||
|
||||
@@ -401,7 +399,7 @@ lookup_ts_config_cache(Oid cfgId)
|
||||
|
||||
/* Try to look up an existing entry */
|
||||
entry = (TSConfigCacheEntry *) hash_search(TSConfigCacheHash,
|
||||
(void *) &cfgId,
|
||||
&cfgId,
|
||||
HASH_FIND, NULL);
|
||||
if (entry == NULL || !entry->isvalid)
|
||||
{
|
||||
@@ -441,7 +439,7 @@ lookup_ts_config_cache(Oid cfgId)
|
||||
/* Now make the cache entry */
|
||||
entry = (TSConfigCacheEntry *)
|
||||
hash_search(TSConfigCacheHash,
|
||||
(void *) &cfgId,
|
||||
&cfgId,
|
||||
HASH_ENTER, &found);
|
||||
Assert(!found); /* it wasn't there a moment ago */
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user