Content-Length: 258750 | pFad | http://github.com/postgrespro/postgres/commit/8cd61d288adfabe1b7f83359eb0abd27382eec08

19 Avoid unnecessary MemSet call · postgrespro/postgres@8cd61d2 · GitHub
Skip to content

Commit 8cd61d2

Browse files
committed
Avoid unnecessary MemSet call
The variable in question was changed from a struct to a pointer some time ago (77947c5). Using MemSet to zero it still works but is obviously unidiomatic and confusing, so change it to a straight assignment. Author: Ranier Vilela <ranier.vf@gmail.com> Discussion: https://www.postgresql.org/message-id/flat/CAEudQApCeq4JjW1BdnwU=m=-DvG5WyUik0Yfn3p6UNphiHjj+w@mail.gmail.com
1 parent d31d309 commit 8cd61d2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/backend/utils/cache/relcache.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6258,7 +6258,7 @@ load_relcache_init_file(bool shared)
62586258
rel->rd_firstRelfilenodeSubid = InvalidSubTransactionId;
62596259
rel->rd_droppedSubid = InvalidSubTransactionId;
62606260
rel->rd_amcache = NULL;
6261-
MemSet(&rel->pgstat_info, 0, sizeof(rel->pgstat_info));
6261+
rel->pgstat_info = NULL;
62626262

62636263
/*
62646264
* Recompute lock and physical addressing info. This is needed in

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres/commit/8cd61d288adfabe1b7f83359eb0abd27382eec08

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy