Remove redundant initializations

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Remove redundant initializations
Дата
Msg-id 9561865d-c352-9ceb-f6d1-016dc999c7e2@enterprisedb.com
обсуждение исходный текст
Ответы Re: Remove redundant initializations  (David Rowley <dgrowleyml@gmail.com>)
Re: Remove redundant initializations  (Daniel Gustafsson <daniel@yesql.se>)
Re: Remove redundant initializations  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: Remove redundant initializations  (vignesh C <vignesh21@gmail.com>)
Список pgsql-hackers
There are certain parts of code that laboriously initialize every field 
of a struct to (some spelling of) zero, even though the whole struct was 
just zeroed (by makeNode() or memset()) a few lines earlier.  Besides 
being redundant, I find this hard to read in some situations because 
it's then very hard to tell what is different between different cases or 
branches.  The attached patch cleans up most of that.  I left alone 
instances where there are (nontrivial) comments attached to the 
initializations or where there appeared to be some value in maintaining 
symmetry.  But a lot of it was just plain useless code, some clearly 
copy-and-pasted repeatedly.

Note 
<https://www.postgresql.org/message-id/flat/4c9f01be-9245-2148-b569-61a8562ef190@2ndquadrant.com> 
where we had a previous discussion about trimming down useless 
initializations to zero.

Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Bharath Rupireddy
Дата:
Сообщение: Re: Refactor "mutually exclusive options" error reporting code in parse_subscription_options
Следующее
От: Arne Roland
Дата:
Сообщение: Re: Rename of triggers for partitioned tables