diff options
| author | Peter Eisentraut | 2023-02-06 08:05:20 +0000 |
|---|---|---|
| committer | Peter Eisentraut | 2023-02-06 08:41:01 +0000 |
| commit | 54a177a948b0a773c25c6737d1cc3cc49222a526 (patch) | |
| tree | a442be10d2b8515f6b1600f60838e379ee546fe8 /src/pl | |
| parent | 009f8d17146da72478fcb8f544b793c443fa254c (diff) | |
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/pl')
| -rw-r--r-- | src/pl/plpgsql/src/pl_comp.c | 6 | ||||
| -rw-r--r-- | src/pl/plpgsql/src/pl_exec.c | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/pl/plpgsql/src/pl_comp.c b/src/pl/plpgsql/src/pl_comp.c index 8ce4186240..7db912fd18 100644 --- a/src/pl/plpgsql/src/pl_comp.c +++ b/src/pl/plpgsql/src/pl_comp.c @@ -2627,7 +2627,7 @@ plpgsql_HashTableLookup(PLpgSQL_func_hashkey *func_key) plpgsql_HashEnt *hentry; hentry = (plpgsql_HashEnt *) hash_search(plpgsql_HashTable, - (void *) func_key, + func_key, HASH_FIND, NULL); if (hentry) @@ -2644,7 +2644,7 @@ plpgsql_HashTableInsert(PLpgSQL_function *function, bool found; hentry = (plpgsql_HashEnt *) hash_search(plpgsql_HashTable, - (void *) func_key, + func_key, HASH_ENTER, &found); if (found) @@ -2665,7 +2665,7 @@ plpgsql_HashTableDelete(PLpgSQL_function *function) return; hentry = (plpgsql_HashEnt *) hash_search(plpgsql_HashTable, - (void *) function->fn_hashkey, + function->fn_hashkey, HASH_REMOVE, NULL); if (hentry == NULL) diff --git a/src/pl/plpgsql/src/pl_exec.c b/src/pl/plpgsql/src/pl_exec.c index 37da624388..70a002a0f6 100644 --- a/src/pl/plpgsql/src/pl_exec.c +++ b/src/pl/plpgsql/src/pl_exec.c @@ -7775,7 +7775,7 @@ get_cast_hashentry(PLpgSQL_execstate *estate, cast_key.srctypmod = srctypmod; cast_key.dsttypmod = dsttypmod; cast_entry = (plpgsql_CastHashEntry *) hash_search(estate->cast_hash, - (void *) &cast_key, + &cast_key, HASH_ENTER, &found); if (!found) /* initialize if new entry */ cast_entry->cast_cexpr = NULL; |
