Remove redundant cast in gindesc.c - Mailing list pgsql-hackers

From zengman
Subject Remove redundant cast in gindesc.c
Date
Msg-id tencent_2A6E523928B834AE74ED06F8@qq.com
Whole thread Raw
Responses Re: Remove redundant cast in gindesc.c
List pgsql-hackers
Hi all,

While reviewing the code, I noticed a small detail and made this simple patch.
There are no functional changes; it’s just meant to make the code look a bit cleaner.

```
diff --git a/src/backend/access/rmgrdesc/gindesc.c b/src/backend/access/rmgrdesc/gindesc.c
index 66a0bf0e0e7..4e24a1cdfe7 100644
--- a/src/backend/access/rmgrdesc/gindesc.c
+++ b/src/backend/access/rmgrdesc/gindesc.c
@@ -126,7 +126,7 @@ gin_desc(StringInfo buf, XLogReaderState *record)
                                ginxlogSplit *xlrec = (ginxlogSplit *) rec;
 
                                appendStringInfo(buf, "isrootsplit: %c",
-                                                                (((ginxlogSplit *) rec)->flags & GIN_SPLIT_ROOT) ? 'T'
:'F');
 
+                                                                (xlrec->flags & GIN_SPLIT_ROOT) ? 'T' : 'F');
                                appendStringInfo(buf, " isdata: %c isleaf: %c",
                                                                 (xlrec->flags & GIN_INSERT_ISDATA) ? 'T' : 'F',
                                                                 (xlrec->flags & GIN_INSERT_ISLEAF) ? 'T' : 'F');
```

--
regards,
Man Zeng
Attachment

pgsql-hackers by date:

Previous
From: Fujii Masao
Date:
Subject: Re: Add missing stats_reset column to pg_stat_database_conflicts view
Next
From: Chao Li
Date:
Subject: Re: client_connection_check_interval default value