Re: [PATCH v2 10/10] fsck.h: update FSCK_OPTIONS_* for object_name

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

 



Jeff King <peff@xxxxxxxx> writes:

> On Thu, Feb 18, 2021 at 11:58:40AM +0100, Ævar Arnfjörð Bjarmason wrote:
>
>> Add the object_name member to the initialization macro. This was
>> omitted in 7b35efd734e (fsck_walk(): optionally name objects on the
>> go, 2016-07-17) when the field was added.
>
> We're correct either way here, because trailing fields that are not
> initialized will get the usual zero-initialization. But I don't mind
> trying to be more complete.
>
> That said, we have embraced designated initializers these days, in which
> case we usually omit the NULL ones. So perhaps:
>
>   #define FSCK_OPTIONS_DEFAULT { \
> 	.walk = fsck_error_function, \
> 	.skiplist = OIDSET_INIT, \
>   }
>   #define FSCK_OPTIONS_STRICT { \
> 	.walk = fsck_error_function, \
> 	.skiplist = OIDSET_INIT, \
> 	.strict = 1, \
>   }
>
> would be more readable still?

Ahh, I should probably have read your reviews first before reading
patches myself ;-)

Thanks.




[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