[ovs-dev] [runt-flows 1/8] datapath: Use min() instead of open-coding it.

Ben Pfaff blp at nicira.com
Fri Aug 13 17:55:40 UTC 2010


Signed-off-by: Ben Pfaff <blp at nicira.com>
---
 datapath/flow.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/datapath/flow.c b/datapath/flow.c
index f769b14..f01071c 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);
-- 
1.7.1





More information about the dev mailing list