From d9fce1ca2313d608ff7c92b69b3ec54661ab16b0 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Fri, 13 Aug 2010 09:43:04 -0700 Subject: [PATCH] datapath: Use min() instead of open-coding it. Signed-off-by: Ben Pfaff --- datapath/flow.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); -- 2.30.2