Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
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

+1-1
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)