From 1e37cc6e2c1f39565275b5dabf0f301c2ece95e1 Mon Sep 17 00:00:00 2001 From: Daniel Gustafsson Date: Wed, 6 Nov 2024 15:11:14 +0100 Subject: [PATCH] Remove unused variable The low variable has not been used since it was added in d168b666823 and can be safely removed. The variable is present in the Sedgewick paper "Analysis of Shellsort and Related Algorithms" as a parameter to the shellsort function, but our implementation does not use it. Remove to improve readability of the code. Author: Koki Nakamura Discussion: https://postgr.es/m/8aeb7b3eda53ca4c65fbacf8f43628fb@oss.nttdata.com --- 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 9a31cdcd096..d00300c5dcb 100644 --- a/src/backend/access/heap/heapam.c +++ b/src/backend/access/heap/heapam.c @@ -8302,7 +8302,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). @@ -8318,7 +8317,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.39.5