summaryrefslogtreecommitdiff
path: root/src/backend/storage/aio/aio.c
diff options
context:
space:
mode:
authorPeter Eisentraut <peter@eisentraut.org>2025-12-02 10:05:12 +0100
committerPeter Eisentraut <peter@eisentraut.org>2025-12-02 10:09:32 +0100
commit4f941d432b42eccd99ba0d22e3a59c073ac2406a (patch)
tree0d9b07faff2842d0fe07a39d761b2fd0ac99ab89 /src/backend/storage/aio/aio.c
parent35988b31db7767ba446009611b9928add1d40f98 (diff)
Remove useless casting to same type
This removes some casts where the input already has the same type as the type specified by the cast. Their presence could cause risks of hiding actual type mismatches in the future or silently discarding qualifiers. It also improves readability. Same kind of idea as 7f798aca1d5 and ef8fe693606. (This does not change all such instances, but only those hand-picked by the author.) Author: Bertrand Drouvot <bertranddrouvot.pg@gmail.com> Reviewed-by: Nathan Bossart <nathandbossart@gmail.com> Reviewed-by: Jacob Champion <jacob.champion@enterprisedb.com> Reviewed-by: Peter Eisentraut <peter@eisentraut.org> Discussion: https://www.postgresql.org/message-id/flat/aSQy2JawavlVlEB0%40ip-10-97-1-34.eu-west-3.compute.internal
Diffstat (limited to 'src/backend/storage/aio/aio.c')
-rw-r--r--src/backend/storage/aio/aio.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/backend/storage/aio/aio.c b/src/backend/storage/aio/aio.c
index dcc47069757..a12b785ade6 100644
--- a/src/backend/storage/aio/aio.c
+++ b/src/backend/storage/aio/aio.c
@@ -603,7 +603,7 @@ pgaio_io_wait(PgAioHandle *ioh, uint64 ref_generation)
if (pgaio_io_was_recycled(ioh, ref_generation, &state))
return;
- switch ((PgAioHandleState) state)
+ switch (state)
{
case PGAIO_HS_IDLE:
case PGAIO_HS_HANDED_OUT:
@@ -908,7 +908,7 @@ static const char *
pgaio_io_state_get_name(PgAioHandleState s)
{
#define PGAIO_HS_TOSTR_CASE(sym) case PGAIO_HS_##sym: return #sym
- switch ((PgAioHandleState) s)
+ switch (s)
{
PGAIO_HS_TOSTR_CASE(IDLE);
PGAIO_HS_TOSTR_CASE(HANDED_OUT);
@@ -933,7 +933,7 @@ pgaio_io_get_state_name(PgAioHandle *ioh)
const char *
pgaio_result_status_string(PgAioResultStatus rs)
{
- switch ((PgAioResultStatus) rs)
+ switch (rs)
{
case PGAIO_RS_UNKNOWN:
return "UNKNOWN";