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:
6
src/backend/utils/cache/attoptcache.c
vendored
6
src/backend/utils/cache/attoptcache.c
vendored
@@ -63,7 +63,7 @@ InvalidateAttoptCacheCallback(Datum arg, int cacheid, uint32 hashvalue)
|
||||
if (attopt->opts)
|
||||
pfree(attopt->opts);
|
||||
if (hash_search(AttoptCacheHash,
|
||||
(void *) &attopt->key,
|
||||
&attopt->key,
|
||||
HASH_REMOVE,
|
||||
NULL) == NULL)
|
||||
elog(ERROR, "hash table corrupted");
|
||||
@@ -116,7 +116,7 @@ get_attribute_options(Oid attrelid, int attnum)
|
||||
key.attnum = attnum;
|
||||
attopt =
|
||||
(AttoptCacheEntry *) hash_search(AttoptCacheHash,
|
||||
(void *) &key,
|
||||
&key,
|
||||
HASH_FIND,
|
||||
NULL);
|
||||
|
||||
@@ -163,7 +163,7 @@ get_attribute_options(Oid attrelid, int attnum)
|
||||
* pg_attribute, since the read could cause a cache flush.
|
||||
*/
|
||||
attopt = (AttoptCacheEntry *) hash_search(AttoptCacheHash,
|
||||
(void *) &key,
|
||||
&key,
|
||||
HASH_ENTER,
|
||||
NULL);
|
||||
attopt->opts = opts;
|
||||
|
||||
Reference in New Issue
Block a user