Thread

Commits

  1. Add explicit initialization for all PlannerGlobal fields

  1. Add explicit initialization for all PlannerGlobal fields

    Richard Guo <guofenglinux@gmail.com> — 2025-05-13T08:02:54Z

    While adding a new field to PlannerGlobal in another patch, I noticed
    that although most fields are explicitly initialized, a few are not.
    This doesn't cause any functional issues, since makeNode() zeroes all
    fields by default.  However, the inconsistency stood out to me, so I
    wrote the attached patch to explicitly initialize the remaining fields
    for clarity and consistency.
    
    Does this seem worthwhile?  Or should we simply rely on makeNode() for
    zero-initialization and consider this unnecessary?
    
    Thanks
    Richard
    
  2. Re: Add explicit initialization for all PlannerGlobal fields

    David Rowley <dgrowleyml@gmail.com> — 2025-05-13T11:26:32Z

    On Tue, 13 May 2025 at 04:03, Richard Guo <guofenglinux@gmail.com> wrote:
    > While adding a new field to PlannerGlobal in another patch, I noticed
    > that although most fields are explicitly initialized, a few are not.
    > This doesn't cause any functional issues, since makeNode() zeroes all
    > fields by default.  However, the inconsistency stood out to me, so I
    > wrote the attached patch to explicitly initialize the remaining fields
    > for clarity and consistency.
    >
    > Does this seem worthwhile?  Or should we simply rely on makeNode() for
    > zero-initialization and consider this unnecessary?
    
    These should be zeroed explicitly.
    
    David
    
    
    
    
  3. Re: Add explicit initialization for all PlannerGlobal fields

    Richard Guo <guofenglinux@gmail.com> — 2025-05-14T01:05:51Z

    On Tue, May 13, 2025 at 8:26 PM David Rowley <dgrowleyml@gmail.com> wrote:
    > On Tue, 13 May 2025 at 04:03, Richard Guo <guofenglinux@gmail.com> wrote:
    > > While adding a new field to PlannerGlobal in another patch, I noticed
    > > that although most fields are explicitly initialized, a few are not.
    > > This doesn't cause any functional issues, since makeNode() zeroes all
    > > fields by default.  However, the inconsistency stood out to me, so I
    > > wrote the attached patch to explicitly initialize the remaining fields
    > > for clarity and consistency.
    > >
    > > Does this seem worthwhile?  Or should we simply rely on makeNode() for
    > > zero-initialization and consider this unnecessary?
    >
    > These should be zeroed explicitly.
    
    Thank you for confirming.  I've pushed this patch to master.
    
    Thanks
    Richard