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 --- src/backend/parser/parse_oper.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/backend/parser/parse_oper.c') diff --git a/src/backend/parser/parse_oper.c b/src/backend/parser/parse_oper.c index 8801f308984..bdc8f8e26af 100644 --- a/src/backend/parser/parse_oper.c +++ b/src/backend/parser/parse_oper.c @@ -1017,7 +1017,7 @@ find_oper_cache_entry(OprCacheKey *key) /* Look for an existing entry */ oprentry = (OprCacheEntry *) hash_search(OprCacheHash, - (void *) key, + key, HASH_FIND, NULL); if (oprentry == NULL) return InvalidOid; @@ -1038,7 +1038,7 @@ make_oper_cache_entry(OprCacheKey *key, Oid opr_oid) Assert(OprCacheHash != NULL); oprentry = (OprCacheEntry *) hash_search(OprCacheHash, - (void *) key, + key, HASH_ENTER, NULL); oprentry->opr_oid = opr_oid; } @@ -1060,7 +1060,7 @@ InvalidateOprCacheCallBack(Datum arg, int cacheid, uint32 hashvalue) while ((hentry = (OprCacheEntry *) hash_seq_search(&status)) != NULL) { if (hash_search(OprCacheHash, - (void *) &hentry->key, + &hentry->key, HASH_REMOVE, NULL) == NULL) elog(ERROR, "hash table corrupted"); } -- cgit v1.2.3