[DTrace-devel] [PATCH v2 03/11] htab: add dt_htab_entries

Nick Alcock nick.alcock at oracle.com
Wed Oct 27 06:26:29 PDT 2021


On 21 Oct 2021, Eugene Loh stated:

> Reviewed-by: Eugene Loh <eugene.loh at oracle.com>
> Only one comment this time:
>
> On 10/20/21 2:53 PM, Nick Alcock wrote:
>> diff --git a/libdtrace/dt_htab.c b/libdtrace/dt_htab.c
>> @@ -44,6 +44,7 @@ struct dt_htab {
>>   	int		mask;
>>   	int		nbuckets;
>>   	dt_htab_ops_t	*ops;
>> +	size_t		nentries;
>>
>> @@ -59,6 +60,7 @@ dt_htab_t *dt_htab_create(dtrace_hdl_t *dtp, dt_htab_ops_t *ops)
>>   	htab->size = 1;
>>   	htab->mask = htab->size - 1;
>>   	htab->nbuckets = 0;
>> +	htab->nentries = 0;
>>   	htab->ops = ops;
> It would be incrementally nicer if the initializations were in the same 
> order as the declarations.  Obviously, no big deal.

Solved by reordering the declaration, which looks prettier too.

-- 
NULL && (void)



More information about the DTrace-devel mailing list