datapath: Fix type of actions_len_left in modify_vlan_tci().
authorBen Pfaff <blp@nicira.com>
Mon, 27 Dec 2010 23:21:29 +0000 (15:21 -0800)
committerBen Pfaff <blp@nicira.com>
Tue, 28 Dec 2010 17:16:37 +0000 (09:16 -0800)
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@nicira.com>
Acked-by: Jesse Gross <jesse@nicira.com>
datapath/actions.c

index 32053f0..639b870 100644 (file)
@@ -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);