[ovs-dev] [sparse 2/4] datapath: Fix type of actions_len_left in modify_vlan_tci().
Ben Pfaff
blp at nicira.com
Mon Dec 27 23:38:11 UTC 2010
The sparse checker reported that the type of the pointer passed to
nla_next(), as &actions_len_left, was incorrect: whereas the parameter
has type "int *", &actions_len_left is an "unsigned int *". This fixes
the problem. It is not a bug fix since the code is equally correct (or
incorrect) either way, but it gets the types right anyhow.
I don't know why GCC was not reporting this as an error.
Signed-off-by: Ben Pfaff <blp at nicira.com>
---
datapath/actions.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/datapath/actions.c b/datapath/actions.c
index 32053f0..639b870 100644
--- a/datapath/actions.c
+++ b/datapath/actions.c
@@ -137,7 +137,7 @@ static struct sk_buff *modify_vlan_tci(struct datapath *dp, struct sk_buff *skb,
* groups configured). */
if (skb_is_gso(skb)) {
const struct nlattr *actions_left;
- u32 actions_len_left;
+ int actions_len_left;
struct sk_buff *segs;
segs = skb_gso_segment(skb, 0);
--
1.7.1
More information about the dev
mailing list