From: Ben Pfaff Date: Fri, 13 Aug 2010 16:43:04 +0000 (-0700) Subject: datapath: Use min() instead of open-coding it. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d9fce1ca2313d608ff7c92b69b3ec54661ab16b0;p=openvswitch datapath: Use min() instead of open-coding it. Signed-off-by: Ben Pfaff --- diff --git a/datapath/flow.c b/datapath/flow.c index f769b14d..f01071c6 100644 --- a/datapath/flow.c +++ b/datapath/flow.c @@ -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);