Remove redundant cast in gindesc.c
Started by zengmanabout 3 hours ago2 messages
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
Attachments:
0001-Remove-redundant-cast-in-gindesc.c.patchapplication/octet-stream; charset=gb18030; name=0001-Remove-redundant-cast-in-gindesc.c.patchDownload+1-2
Re: Remove redundant cast in gindesc.c
On Tue, Mar 10, 2026 at 09:31:33AM +0800, zengman wrote:
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.
Thanks, grabbed this one for later.
--
Michael