aboutsummaryrefslogtreecommitdiff
path: root/src/backend/storage/smgr/md.c
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2020-09-03 22:57:35 -0400
committerBruce Momjian <bruce@momjian.us>2020-09-03 22:57:35 -0400
commite36e936e0ee664e07588732d1a8d105c5ec8e57d (patch)
treeb553ea0e8f269a578533657524d0d516a91c708f /src/backend/storage/smgr/md.c
parent844c05abc3f1c1703bf17cf44ab66351ed9711d2 (diff)
downloadpostgresql-e36e936e0ee664e07588732d1a8d105c5ec8e57d.tar.gz
postgresql-e36e936e0ee664e07588732d1a8d105c5ec8e57d.zip
remove redundant initializations
Reported-by: Ranier Vilela Discussion: https://postgr.es/m/CAEudQAo1+AcGppxDSg8k+zF4+Kv+eJyqzEDdbpDg58-=MQcerQ@mail.gmail.com Author: Ranier Vilela Backpatch-through: master
Diffstat (limited to 'src/backend/storage/smgr/md.c')
-rw-r--r--src/backend/storage/smgr/md.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/backend/storage/smgr/md.c b/src/backend/storage/smgr/md.c
index 0eacd461cd3..1d4aa482ccd 100644
--- a/src/backend/storage/smgr/md.c
+++ b/src/backend/storage/smgr/md.c
@@ -734,9 +734,11 @@ mdwrite(SMgrRelation reln, ForkNumber forknum, BlockNumber blocknum,
BlockNumber
mdnblocks(SMgrRelation reln, ForkNumber forknum)
{
- MdfdVec *v = mdopenfork(reln, forknum, EXTENSION_FAIL);
+ MdfdVec *v;
BlockNumber nblocks;
- BlockNumber segno = 0;
+ BlockNumber segno;
+
+ mdopenfork(reln, forknum, EXTENSION_FAIL);
/* mdopen has opened the first segment */
Assert(reln->md_num_open_segs[forknum] > 0);