Re: [PATCH bpf 05/12] bpf: extract setup_func_entry() utility function

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

 



On Fri, 2023-11-17 at 11:46 -0500, Andrii Nakryiko wrote:
[...]
> > +       /* Transfer references to the callee */
> > +       err = copy_reference_state(callee, caller);
> > +       if (err)
> > +               goto err_out;
> > +
> > +       err = set_callee_state_cb(env, caller, callee, callsite);
> > +       if (err)
> > +               goto err_out;
> 
> given we are touching and moving this code, it might make sense to
> make it a bit more succinct with this pattern:
> 
> err = copy_reference_state(...);
> err = err ?: set_callee_state_cb();
> if (err)
>     goto err_out;
> 
> 
> Error handling is a bit less distracting this way.

Will do.







[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux