public inbox for [email protected]
help / color / mirror / Atom feedFrom: btnakamurakoukil <[email protected]>
To: [email protected]
Subject: index_delete_sort: Unnecessary variable "low" is used in heapam.c
Date: Tue, 24 Sep 2024 17:32:48 +0900
Message-ID: <[email protected]> (raw)
Hi hackers,
I noticed unnecessary variable "low" in index_delete_sort()
(/postgres/src/backend/access/heap/heapam.c), patch attached. What do
you think?
Regards,
Koki Nakamura <[email protected]>
Attachments:
[text/x-diff] 0001-Delete-low.patch (1023B, ../[email protected]/2-0001-Delete-low.patch)
download | inline diff:
From c0bf7f8468cb0e4f74c41e434adf70bdbfb3ad6d Mon Sep 17 00:00:00 2001
From: KokiNaka <[email protected]>
Date: Tue, 24 Sep 2024 10:46:09 +0900
Subject: [PATCH] Delete low
---
src/backend/access/heap/heapam.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/src/backend/access/heap/heapam.c b/src/backend/access/heap/heapam.c
index f167107257..64953541cd 100644
--- a/src/backend/access/heap/heapam.c
+++ b/src/backend/access/heap/heapam.c
@@ -7940,7 +7940,6 @@ index_delete_sort(TM_IndexDeleteOp *delstate)
{
TM_IndexDelete *deltids = delstate->deltids;
int ndeltids = delstate->ndeltids;
- int low = 0;
/*
* Shellsort gap sequence (taken from Sedgewick-Incerpi paper).
@@ -7956,7 +7955,7 @@ index_delete_sort(TM_IndexDeleteOp *delstate)
for (int g = 0; g < lengthof(gaps); g++)
{
- for (int hi = gaps[g], i = low + hi; i < ndeltids; i++)
+ for (int hi = gaps[g], i = hi; i < ndeltids; i++)
{
TM_IndexDelete d = deltids[i];
int j = i;
--
2.40.1
view thread (3+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected]
Subject: Re: index_delete_sort: Unnecessary variable "low" is used in heapam.c
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox