1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-12 21:01:52 +03:00

Remove unnecessary casts

Some code carefully cast all data buffer arguments for data write and
read function calls to void *, even though the respective arguments
are already void *.  Remove this unnecessary clutter.

Discussion: https://www.postgresql.org/message-id/flat/11dda853-bb5b-59ba-a746-e168b1ce4bdb%40enterprisedb.com
This commit is contained in:
Peter Eisentraut
2022-12-30 10:02:59 +01:00
parent 388e80132c
commit 5f2f99c9c6
5 changed files with 23 additions and 23 deletions

View File

@ -2961,10 +2961,10 @@ hashagg_spill_tuple(AggState *aggstate, HashAggSpill *spill,
tape = spill->partitions[partition];
LogicalTapeWrite(tape, (void *) &hash, sizeof(uint32));
LogicalTapeWrite(tape, &hash, sizeof(uint32));
total_written += sizeof(uint32);
LogicalTapeWrite(tape, (void *) tuple, tuple->t_len);
LogicalTapeWrite(tape, tuple, tuple->t_len);
total_written += tuple->t_len;
if (shouldFree)
@ -3029,7 +3029,7 @@ hashagg_batch_read(HashAggBatch *batch, uint32 *hashp)
tuple->t_len = t_len;
nread = LogicalTapeRead(tape,
(void *) ((char *) tuple + sizeof(uint32)),
(char *) tuple + sizeof(uint32),
t_len - sizeof(uint32));
if (nread != t_len - sizeof(uint32))
ereport(ERROR,