From: Ben Pfaff Date: Tue, 24 Jul 2012 22:43:27 +0000 (-0700) Subject: meta-flow: Fix "sparse" warning in mf_are_prereqs_ok(). X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5921e99ab1d0b6e0964b79a29107c65b5fb24f80;p=openvswitch meta-flow: Fix "sparse" warning in mf_are_prereqs_ok(). This fixes the following warning from "sparse": meta-flow.c:830:31: warning: incorrect type in return expression (different base types) meta-flow.c:830:31: expected bool meta-flow.c:830:31: got restricted __be16 Signed-off-by: Ben Pfaff --- diff --git a/lib/meta-flow.c b/lib/meta-flow.c index c50cfc53..3713ca4e 100644 --- a/lib/meta-flow.c +++ b/lib/meta-flow.c @@ -827,7 +827,7 @@ mf_are_prereqs_ok(const struct mf_field *mf, const struct flow *flow) case MFP_IPV6: return flow->dl_type == htons(ETH_TYPE_IPV6); case MFP_VLAN_VID: - return flow->vlan_tci & htons(VLAN_CFI); + return (flow->vlan_tci & htons(VLAN_CFI)) != 0; case MFP_IP_ANY: return is_ip_any(flow);