Re: Remove redundant initializations

2021-10-01 Thread Michael Paquier
On Sun, Sep 12, 2021 at 06:26:33PM -0700, Noah Misch wrote: > I'm +1 for the $SUBJECT concept, mostly because I take longer to read code > where immaterial zero-initialization lines are diluting the code. A quick > scan of the patch content is promising. If there's a decision to move > forward, I

Re: Remove redundant initializations

2021-09-12 Thread Noah Misch
I'm +1 for the $SUBJECT concept, mostly because I take longer to read code where immaterial zero-initialization lines are diluting the code. A quick scan of the patch content is promising. If there's a decision to move forward, I'm happy to review it more closely. On Wed, Jun 30, 2021 at 09:28:1

Re: Remove redundant initializations

2021-07-15 Thread vignesh C
On Mon, Jun 28, 2021 at 3:30 PM Peter Eisentraut wrote: > > 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,

Re: Remove redundant initializations

2021-06-30 Thread Tom Lane
David Rowley writes: > On Tue, 29 Jun 2021 at 02:15, Tom Lane wrote: >> The primary case where I personally rely on that style is when adding a >> new field to a struct. Currently it's possible to grep for some existing >> field and add the new one beside it. Leaving out initializations by >> r

Re: Remove redundant initializations

2021-06-30 Thread David Rowley
On Tue, 29 Jun 2021 at 02:15, Tom Lane wrote: > The primary case where I personally rely on that style is when adding a > new field to a struct. Currently it's possible to grep for some existing > field and add the new one beside it. Leaving out initializations by > relying on side-effects of ma

Re: Remove redundant initializations

2021-06-28 Thread Tom Lane
Peter Eisentraut writes: > 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. FWIW, I think that it's an intentional style choice to exp

Re: Remove redundant initializations

2021-06-28 Thread Daniel Gustafsson
> On 28 Jun 2021, at 11:59, Peter Eisentraut > wrote: > > 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 > redundan

Re: Remove redundant initializations

2021-06-28 Thread David Rowley
On Mon, 28 Jun 2021 at 21:59, Peter Eisentraut wrote: > > 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