mirror of
https://github.com/postgres/postgres.git
synced 2025-11-18 02:02:55 +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:
12
src/backend/utils/cache/relcache.c
vendored
12
src/backend/utils/cache/relcache.c
vendored
@@ -210,7 +210,7 @@ static int EOXactTupleDescArrayLen = 0;
|
||||
do { \
|
||||
RelIdCacheEnt *hentry; bool found; \
|
||||
hentry = (RelIdCacheEnt *) hash_search(RelationIdCache, \
|
||||
(void *) &((RELATION)->rd_id), \
|
||||
&((RELATION)->rd_id), \
|
||||
HASH_ENTER, &found); \
|
||||
if (found) \
|
||||
{ \
|
||||
@@ -232,7 +232,7 @@ do { \
|
||||
do { \
|
||||
RelIdCacheEnt *hentry; \
|
||||
hentry = (RelIdCacheEnt *) hash_search(RelationIdCache, \
|
||||
(void *) &(ID), \
|
||||
&(ID), \
|
||||
HASH_FIND, NULL); \
|
||||
if (hentry) \
|
||||
RELATION = hentry->reldesc; \
|
||||
@@ -244,7 +244,7 @@ do { \
|
||||
do { \
|
||||
RelIdCacheEnt *hentry; \
|
||||
hentry = (RelIdCacheEnt *) hash_search(RelationIdCache, \
|
||||
(void *) &((RELATION)->rd_id), \
|
||||
&((RELATION)->rd_id), \
|
||||
HASH_REMOVE, NULL); \
|
||||
if (hentry == NULL) \
|
||||
elog(WARNING, "failed to delete relcache entry for OID %u", \
|
||||
@@ -1663,7 +1663,7 @@ LookupOpclassInfo(Oid operatorClassOid,
|
||||
}
|
||||
|
||||
opcentry = (OpClassCacheEnt *) hash_search(OpClassCache,
|
||||
(void *) &operatorClassOid,
|
||||
&operatorClassOid,
|
||||
HASH_ENTER, &found);
|
||||
|
||||
if (!found)
|
||||
@@ -3210,7 +3210,7 @@ AtEOXact_RelationCache(bool isCommit)
|
||||
for (i = 0; i < eoxact_list_len; i++)
|
||||
{
|
||||
idhentry = (RelIdCacheEnt *) hash_search(RelationIdCache,
|
||||
(void *) &eoxact_list[i],
|
||||
&eoxact_list[i],
|
||||
HASH_FIND,
|
||||
NULL);
|
||||
if (idhentry != NULL)
|
||||
@@ -3359,7 +3359,7 @@ AtEOSubXact_RelationCache(bool isCommit, SubTransactionId mySubid,
|
||||
for (i = 0; i < eoxact_list_len; i++)
|
||||
{
|
||||
idhentry = (RelIdCacheEnt *) hash_search(RelationIdCache,
|
||||
(void *) &eoxact_list[i],
|
||||
&eoxact_list[i],
|
||||
HASH_FIND,
|
||||
NULL);
|
||||
if (idhentry != NULL)
|
||||
|
||||
Reference in New Issue
Block a user