On Wed, Sep 23, 2020 at 9:05 AM Andrii Nakryiko
<andrii.nakry...@gmail.com> wrote:
>
> On Wed, Sep 23, 2020 at 9:03 AM Lorenz Bauer <l...@cloudflare.com> wrote:
> >
> > Arrays with designated initializers have an implicit length of the highest
> > initialized value plus one. I used this to ensure that newly added entries
> > in enum bpf_reg_type get a NULL entry in compatible_reg_types.
> >
> > This is difficult to understand since it requires knowledge of the
> > peculiarities of designated initializers. Use __BPF_ARG_TYPE_MAX to size
> > the array instead.
> >
> > Signed-off-by: Lorenz Bauer <l...@cloudflare.com>
> > Suggested-by: Alexei Starovoitov <a...@kernel.org>
> > ---
>
> I like this more as well.
>
> Acked-by: Andrii Nakryiko <andr...@fb.com>

Applied. Thanks

Reply via email to