Thanks, I'll apply this in a moment.

On Tue, Dec 31, 2013 at 11:41:52AM -0800, Andy Zhou wrote:
> LGTM.
> 
> 
> On Tue, Dec 31, 2013 at 10:45 AM, Ben Pfaff <b...@nicira.com> wrote:
> 
> > Simplify (a && b) || (!a && c) to just a ? b : c.
> >
> > Signed-off-by: Ben Pfaff <b...@nicira.com>
> > ---
> >  lib/odp-util.c |    5 +++--
> >  1 file changed, 3 insertions(+), 2 deletions(-)
> >
> > diff --git a/lib/odp-util.c b/lib/odp-util.c
> > index 3227e69..aff6c95 100644
> > --- a/lib/odp-util.c
> > +++ b/lib/odp-util.c
> > @@ -3144,8 +3144,9 @@ odp_flow_key_to_flow__(const struct nlattr *key,
> > size_t key_len,
> >          return ODP_FIT_ERROR;
> >      }
> >
> > -    if ((is_mask && (src_flow->vlan_tci & htons(VLAN_CFI))) ||
> > -        (!is_mask && src_flow->dl_type == htons(ETH_TYPE_VLAN))) {
> > +    if (is_mask
> > +        ? (src_flow->vlan_tci & htons(VLAN_CFI)) != 0
> > +        : src_flow->dl_type == htons(ETH_TYPE_VLAN)) {
> >          return parse_8021q_onward(attrs, present_attrs, out_of_range_attr,
> >                                    expected_attrs, flow, key, key_len,
> > src_flow);
> >      }
> > --
> > 1.7.10.4
> >
> > _______________________________________________
> > dev mailing list
> > dev@openvswitch.org
> > http://openvswitch.org/mailman/listinfo/dev
> >
_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to