aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/adt/array_typanalyze.c
diff options
context:
space:
mode:
authorPeter Eisentraut <peter@eisentraut.org>2023-02-06 09:05:20 +0100
committerPeter Eisentraut <peter@eisentraut.org>2023-02-06 09:41:01 +0100
commit54a177a948b0a773c25c6737d1cc3cc49222a526 (patch)
treea442be10d2b8515f6b1600f60838e379ee546fe8 /src/backend/utils/adt/array_typanalyze.c
parent009f8d17146da72478fcb8f544b793c443fa254c (diff)
downloadpostgresql-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/adt/array_typanalyze.c')
-rw-r--r--src/backend/utils/adt/array_typanalyze.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/backend/utils/adt/array_typanalyze.c b/src/backend/utils/adt/array_typanalyze.c
index 5841d7d6fcb..52e160d6bbb 100644
--- a/src/backend/utils/adt/array_typanalyze.c
+++ b/src/backend/utils/adt/array_typanalyze.c
@@ -362,7 +362,7 @@ compute_array_stats(VacAttrStats *stats, AnalyzeAttrFetchFunc fetchfunc,
/* Lookup current element in hashtable, adding it if new */
elem_value = elem_values[j];
item = (TrackItem *) hash_search(elements_tab,
- (const void *) &elem_value,
+ &elem_value,
HASH_ENTER, &found);
if (found)
@@ -690,7 +690,7 @@ prune_element_hashtable(HTAB *elements_tab, int b_current)
{
Datum value = item->key;
- if (hash_search(elements_tab, (const void *) &item->key,
+ if (hash_search(elements_tab, &item->key,
HASH_REMOVE, NULL) == NULL)
elog(ERROR, "hash table corrupted");
/* We should free memory if element is not passed by value */