[ovs-dev] [netlink v3 06/16] datapath: Convert odp_flow_key to use Netlink attributes instead.

Ben Pfaff blp at nicira.com
Fri Jan 7 22:34:01 UTC 2011


On Fri, Jan 07, 2011 at 05:30:54PM -0500, Jesse Gross wrote:
> On Fri, Jan 7, 2011 at 5:19 PM, Ben Pfaff <blp at nicira.com> wrote:
> > On Fri, Jan 07, 2011 at 05:06:31PM -0500, Jesse Gross wrote:
> >> On Wed, Dec 29, 2010 at 7:56 PM, Ben Pfaff <blp at nicira.com> wrote:
> >> > +               prev_type = type;
> >> > +       }
> >> > +       if (rem)
> >> > +               return -EINVAL;
> >> > +
> >> > +       switch (prev_type) {
> >>
> >> Should this be type (instead of prev_type)?
> >
> > They're identical at this point because of the "prev_type = type;"
> > assignment at the end of the loop body.  Also, "type" is out of scope at
> > this point.
> >
> > Do you want me to move "type" out of the loop and use it instead?
> > Wouldn't bother me.
> 
> I saw the break statements when I was looking at this and thought that
> they applied to the loop instead of the switch, skipping the
> assignment at the end.  However, that's obviously not the case, so it
> looks fine.
> 
> The combined result:
> Acked-by: Jesse Gross <jesse at nicira.com>

Thanks.




More information about the dev mailing list