Remove redundant variable pageSize in gistinitpage
authorPeter Eisentraut <peter@eisentraut.org>
Fri, 25 Jun 2021 05:55:34 +0000 (07:55 +0200)
committerPeter Eisentraut <peter@eisentraut.org>
Fri, 25 Jun 2021 05:55:34 +0000 (07:55 +0200)
In gistinitpage, pageSize variable looks redundant, instead just
pass BLCKSZ. This will be consistent with its peers BloomInitPage,
brin_page_init and SpGistInitPage.

Author: Bharath Rupireddy <bharath.rupireddy@enterprisedb.com>
Discussion: https://www.postgresql.org/message-id/flat/CALj2ACWj=V1k5591eeZK2sOg2FYuBUp6azFO8tMkBtGfXf8PMQ@mail.gmail.com

src/backend/access/gist/gistutil.c

index 8dcd53c457799722463428538f2fed6b38e95930..43ba03b6eb97cd523ccee974c5a93356fd5f1679 100644 (file)
@@ -756,9 +756,8 @@ void
 gistinitpage(Page page, uint32 f)
 {
        GISTPageOpaque opaque;
-       Size            pageSize = BLCKSZ;
 
-       PageInit(page, pageSize, sizeof(GISTPageOpaqueData));
+       PageInit(page, BLCKSZ, sizeof(GISTPageOpaqueData));
 
        opaque = GistPageGetOpaque(page);
        opaque->rightlink = InvalidBlockNumber;