Re: [PATCH 03/16] odb: move initialization bit into `struct packfile_store`

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Aug 19, 2025 at 02:57:54AM -0700, Karthik Nayak wrote:
> Patrick Steinhardt <ps@xxxxxx> writes:
> 
> > diff --git a/packfile.h b/packfile.h
> > index 1404b80917..573564b19e 100644
> > --- a/packfile.h
> > +++ b/packfile.h
> > @@ -64,6 +64,12 @@ struct packfile_store {
> >  	 * list.
> >  	 */
> >  	struct packed_git *packs;
> > +
> > +	/*
> > +	 * Whether packfiles have already been populated with this store's
> > +	 * packs.
> > +	 */
> > +	unsigned initialized : 1;
> >  };
> >
> 
> Nit: I know this is moved from existing code, but might be nice to
> adhere to our format rules here and remove spaces around the bit field.
> 
> Tangent: Also this is something that is only mentioned in the
> '.clang-format' but not in any of our documentation, should we add it to
> the documentation? Usage seems to be around the same for both types.

Well, now that booleans are allowed I think we should just stop using
width specifiers like this altogether and instead use bool. There's
probably still going to be cases where we use those, but I assume that
the majority of users of this syntax is for flags.

Patrick




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux