Re: [PATCH 1/4] repack: convert "names" util bitfield to array
On Fri, Oct 21, 2022 at 04:51:44PM -0700, Junio C Hamano wrote:
Show 23 quoted lines
> Jeff King <peff@peff.net> writes:
>
> > On Fri, Oct 21, 2022 at 04:35:17PM -0700, Junio C Hamano wrote:
> >
> >> Jeff King <peff@peff.net> writes:
> >>
> >> > Yeah, I actually considered writing it that way, but it felt a bit silly
> >> > to use _ARRAY for something which is clearly meant to be a single item.
> >>
> >> You are not alone. I updated Réne's coccinelle rules to refrain
> >> from converting xcalloc() to CALLOC_ARRAY() for a single element
> >> case exactly because it feels silly to use array function for a
> >> singleton with 1c57cc70 (cocci: allow xcalloc(1, size), 2021-03-15).
> >
> > OK. Then I'll leave it as-is, then. :)
> >
> > -Peff
>
> I do not think any "huh? array for a singleton" folks mind your
>
> #define CALLOC(x) CALLOC_ARRAY((x), 1)
>
> though ;-)
I may follow-up on that, but let's leave it outside of this series.
-Peff