RE: [PATCH RFC net-next 08/14] bpf: add eBPF verifier

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

 



From: Alexei Starovoitov
...
> >> +#define _(OP) ({ int ret = OP; if (ret < 0) return ret; })
...
> >> +       _(get_map_info(env, map_id, &map));
> >
> > Nit: such macros should be removed, please.
> 
> It may surely look unconventional, but alternative is to replace
> every usage of _ macro with:
> err =
> if (err)
>   return err;
> 
> and since this macro is used 38 times, it will add ~120 unnecessary
> lines that will only make code much harder to follow.
> I tried not using macro and results were not pleasing.

The problem is that they are hidden control flow.
As such they make flow analysis harder for the casual reader.

The extra lines really shouldn't matter.

	David

��.n��������+%������w��{.n�����{����*jg��������ݢj����G�������j:+v���w�m������w�������h�����٥





[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux