diff options
author | Peter Eisentraut <peter@eisentraut.org> | 2023-02-06 09:05:20 +0100 |
---|---|---|
committer | Peter Eisentraut <peter@eisentraut.org> | 2023-02-06 09:41:01 +0100 |
commit | 54a177a948b0a773c25c6737d1cc3cc49222a526 (patch) | |
tree | a442be10d2b8515f6b1600f60838e379ee546fe8 /src/backend/utils/cache/relcache.c | |
parent | 009f8d17146da72478fcb8f544b793c443fa254c (diff) | |
download | postgresql-54a177a948b0a773c25c6737d1cc3cc49222a526.tar.gz postgresql-54a177a948b0a773c25c6737d1cc3cc49222a526.zip |
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 5999e78fc45dcb91784b64b6e9ae43f4e4f68ca2).
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
Diffstat (limited to 'src/backend/utils/cache/relcache.c')
-rw-r--r-- | src/backend/utils/cache/relcache.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/backend/utils/cache/relcache.c b/src/backend/utils/cache/relcache.c index d171cfcf2fc..dfda0ab7d69 100644 --- a/src/backend/utils/cache/relcache.c +++ b/src/backend/utils/cache/relcache.c @@ -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) |