Re: [PATCH 2/2] fsck: use oidset for skiplist
- From
René Scharfe <l.s.r@web.de>
- Date
- Aug 25, 2018, 18:49 UTC
- Message-ID
- <a2577ecd-52a4-1343-a0b8-bbf1883db619@web.de>
- In-Reply-To
- <bc9f21c6-b362-2e3f-1820-7da93a76a7c8@ramsayjones.plus.com>
Am 11.08.2018 um 22:48 schrieb Ramsay Jones:
Show 19 quoted lines
> On 11/08/18 16:47, René Scharfe wrote:
>> @@ -34,12 +36,12 @@ struct fsck_options {
>> fsck_error error_func;
>> unsigned strict:1;
>> int *msg_type;
>> - struct oid_array *skiplist;
>> + struct oidset skiplist;
>> struct decoration *object_names;
>> };
>>
>> -#define FSCK_OPTIONS_DEFAULT { NULL, fsck_error_function, 0, NULL }
>> -#define FSCK_OPTIONS_STRICT { NULL, fsck_error_function, 1, NULL }
>> +#define FSCK_OPTIONS_DEFAULT { NULL, fsck_error_function, 0, NULL, OIDSET_INIT }
>> +#define FSCK_OPTIONS_STRICT { NULL, fsck_error_function, 1, NULL, OIDSET_INIT }
>
> Note that a NULL initialiser, for the object_names field, is missing
> (not introduced by this patch). Since you have bumped into the 80th
> column, you may not want to add that NULL to the end of these macros
> (it is not _necessary_ after all). However, ... :-DExactly my thoughts -- except the "However" part. :)
I even thought about reordering the struct to move the NULL-initialized elements to the end, allowing us to drop them from the initializer, but felt that this would be a bit too much..
René