Tweak some codes format in gist.c
Hi,
I found some inconsistent code format in gist.c.
See the attached.
--
Thanks,
Tender Wang
Attachments:
0001-Fix-some-codes-format-in-gist.c.patchapplication/octet-stream; name=0001-Fix-some-codes-format-in-gist.c.patchDownload
From 2963a011254c93b78fc7d38c4b6f5a84665b89c6 Mon Sep 17 00:00:00 2001
From: Tender Wang <tndrwang@gmail.com>
Date: Fri, 15 Nov 2024 17:44:38 +0800
Subject: [PATCH] Fix some codes format in gist.c()
---
src/backend/access/gist/gist.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/backend/access/gist/gist.c b/src/backend/access/gist/gist.c
index 177786a13f..83b819f1a5 100644
--- a/src/backend/access/gist/gist.c
+++ b/src/backend/access/gist/gist.c
@@ -43,7 +43,7 @@ static void gistprunepage(Relation rel, Page page, Buffer buffer,
#define ROTATEDIST(d) do { \
- SplitPageLayout *tmp=(SplitPageLayout*)palloc0(sizeof(SplitPageLayout)); \
+ SplitPageLayout *tmp = (SplitPageLayout *) palloc0(sizeof(SplitPageLayout)); \
tmp->block.blkno = InvalidBlockNumber; \
tmp->buffer = InvalidBuffer; \
tmp->next = (d); \
--
2.25.1
On 15 Nov 2024, at 14:48, Tender Wang <tndrwang@gmail.com> wrote:
Hi,
I found some inconsistent code format in gist.c.
See the attached.
I’d suggest to combine such changes with some real code modification done nearby. There’s plenty of GiST patches on commitfest.
Thanks!
Best regards, Andrey Borodin.
Andrey M. Borodin <x4mmm@yandex-team.ru> 于2024年11月15日周五 17:57写道:
On 15 Nov 2024, at 14:48, Tender Wang <tndrwang@gmail.com> wrote:
Hi,
I found some inconsistent code format in gist.c.
See the attached.I’d suggest to combine such changes with some real code modification done
nearby. There’s plenty of GiST patches on commitfest.
Thanks!Yeah, agree. According to the nearby real code modification, I made the
change.
--
Thanks,
Tender Wang
On Fri, Nov 15, 2024 at 02:56:57PM +0500, Andrey M. Borodin wrote:
I’d suggest to combine such changes with some real code modification
done nearby. There’s plenty of GiST patches on commitfest.
We do a lot of cosmetic fixes like this one, and sometimes we also
have the argument that these should not be blindly included in other
patches as that's just unrelated noise.
FWIW, I don't really mind in this case and this is consistent with the
surroundings, so applied on HEAD.
There is one more in trgm.h, though it's OK as-is, as well.
--
Michael
Michael Paquier <michael@paquier.xyz> 于2024年11月18日周一 12:50写道:
On Fri, Nov 15, 2024 at 02:56:57PM +0500, Andrey M. Borodin wrote:
I’d suggest to combine such changes with some real code modification
done nearby. There’s plenty of GiST patches on commitfest.We do a lot of cosmetic fixes like this one, and sometimes we also
have the argument that these should not be blindly included in other
patches as that's just unrelated noise.FWIW, I don't really mind in this case and this is consistent with the
surroundings, so applied on HEAD.There is one more in trgm.h, though it's OK as-is, as well.
--
Michael
Thanks for pushing.
--
Thanks,
Tender Wang