tunneling: Fix uninitialized variable warning in check_mtu.
authorJesse Gross <jesse@nicira.com>
Fri, 4 Feb 2011 21:15:18 +0000 (13:15 -0800)
committerJesse Gross <jesse@nicira.com>
Fri, 4 Feb 2011 23:04:41 +0000 (15:04 -0800)
The MTU is only needed if we are doing PMTUD but some compilers
complain that it could be used uninitialized.

Reported-by: Justin Pettit <jpettit@nicira.com>
Signed-off-by: Jesse Gross <jesse@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
datapath/tunnel.c

index 6d0e7b9c603b35e0e63753ee31a223cf7de3a049..7bf46e07e9052d557045bebfda023a2c32d60898 100644 (file)
@@ -717,7 +717,7 @@ static bool check_mtu(struct sk_buff *skb,
 {
        bool pmtud = mutable->flags & TNL_F_PMTUD;
        __be16 frag_off = 0;
-       int mtu;
+       int mtu = 0;
 
        if (pmtud) {
                frag_off = htons(IP_DF);