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:
8
src/backend/utils/cache/typcache.c
vendored
8
src/backend/utils/cache/typcache.c
vendored
@@ -364,7 +364,7 @@ lookup_type_cache(Oid type_id, int flags)
|
||||
|
||||
/* Try to look up an existing entry */
|
||||
typentry = (TypeCacheEntry *) hash_search(TypeCacheHash,
|
||||
(void *) &type_id,
|
||||
&type_id,
|
||||
HASH_FIND, NULL);
|
||||
if (typentry == NULL)
|
||||
{
|
||||
@@ -392,7 +392,7 @@ lookup_type_cache(Oid type_id, int flags)
|
||||
|
||||
/* Now make the typcache entry */
|
||||
typentry = (TypeCacheEntry *) hash_search(TypeCacheHash,
|
||||
(void *) &type_id,
|
||||
&type_id,
|
||||
HASH_ENTER, &found);
|
||||
Assert(!found); /* it wasn't there a moment ago */
|
||||
|
||||
@@ -1974,7 +1974,7 @@ assign_record_type_typmod(TupleDesc tupDesc)
|
||||
* the allocations succeed before we create the new entry.
|
||||
*/
|
||||
recentry = (RecordCacheEntry *) hash_search(RecordCacheHash,
|
||||
(void *) &tupDesc,
|
||||
&tupDesc,
|
||||
HASH_FIND, &found);
|
||||
if (found && recentry->tupdesc != NULL)
|
||||
{
|
||||
@@ -2012,7 +2012,7 @@ assign_record_type_typmod(TupleDesc tupDesc)
|
||||
|
||||
/* Fully initialized; create the hash table entry */
|
||||
recentry = (RecordCacheEntry *) hash_search(RecordCacheHash,
|
||||
(void *) &tupDesc,
|
||||
&tupDesc,
|
||||
HASH_ENTER, NULL);
|
||||
recentry->tupdesc = entDesc;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user