From 54a177a948b0a773c25c6737d1cc3cc49222a526 Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Mon, 6 Feb 2023 09:05:20 +0100 Subject: 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 Discussion: https://www.postgresql.org/message-id/flat/fd9adf5d-b1aa-e82f-e4c7-263c30145807%40enterprisedb.com --- contrib/postgres_fdw/shippable.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'contrib/postgres_fdw') diff --git a/contrib/postgres_fdw/shippable.c b/contrib/postgres_fdw/shippable.c index 1b47a30dbfd..eb33d2a9932 100644 --- a/contrib/postgres_fdw/shippable.c +++ b/contrib/postgres_fdw/shippable.c @@ -77,7 +77,7 @@ InvalidateShippableCacheCallback(Datum arg, int cacheid, uint32 hashvalue) while ((entry = (ShippableCacheEntry *) hash_seq_search(&status)) != NULL) { if (hash_search(ShippableCacheHash, - (void *) &entry->key, + &entry->key, HASH_REMOVE, NULL) == NULL) elog(ERROR, "hash table corrupted"); @@ -183,10 +183,7 @@ is_shippable(Oid objectId, Oid classId, PgFdwRelationInfo *fpinfo) /* See if we already cached the result. */ entry = (ShippableCacheEntry *) - hash_search(ShippableCacheHash, - (void *) &key, - HASH_FIND, - NULL); + hash_search(ShippableCacheHash, &key, HASH_FIND, NULL); if (!entry) { @@ -199,10 +196,7 @@ is_shippable(Oid objectId, Oid classId, PgFdwRelationInfo *fpinfo) * cache invalidation. */ entry = (ShippableCacheEntry *) - hash_search(ShippableCacheHash, - (void *) &key, - HASH_ENTER, - NULL); + hash_search(ShippableCacheHash, &key, HASH_ENTER, NULL); entry->shippable = shippable; } -- cgit v1.2.3