datapath: Use min() instead of open-coding it.
[openvswitch] / datapath / flow.c
index f769b14d6abc9244d2a6a75d3cd4e545a980f7ec..f01071c61b6f4f1cc7e85ab201777ed30d7cb4e0 100644 (file)
@@ -234,7 +234,7 @@ int flow_extract(struct sk_buff *skb, u16 in_port, struct odp_flow_key *key)
 
        if (skb->len < sizeof *eth)
                return 0;
-       if (!pskb_may_pull(skb, skb->len >= 64 ? 64 : skb->len))
+       if (!pskb_may_pull(skb, min(skb->len, 64u)))
                return 0;
 
        skb_reset_mac_header(skb);