On Mon, 21 Aug 2017 17:19:47 -0700
Yipeng Wang <yipeng1.w...@intel.com> wrote:

> +int
> +rte_member_lookup(const void *ss, const void *key,
> +             MEMBER_SET_TYPE *set_id)
> +{
> +     const struct rte_member_setsum *setsum = ss;
> +     if (setsum == NULL || key == NULL || set_id == NULL)
> +             return -EINVAL;
> +
> +     int ret = 0;

Don't needlessly initialize all variable.
In all code paths, ret is set.

In fact you could just make all cases of the switch into return
and  compiler could optimize it as a tail call.

Reply via email to