datapath: Use min() instead of open-coding it.
authorBen Pfaff <blp@nicira.com>
Fri, 13 Aug 2010 16:43:04 +0000 (09:43 -0700)
committerBen Pfaff <blp@nicira.com>
Thu, 26 Aug 2010 16:15:42 +0000 (09:15 -0700)
Signed-off-by: Ben Pfaff <blp@nicira.com>
datapath/flow.c

index f769b14..f01071c 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);