From: Jesse Gross Date: Fri, 4 Feb 2011 21:15:18 +0000 (-0800) Subject: tunneling: Fix uninitialized variable warning in check_mtu. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ee3cdc0028ad4c5a665075fe9ce35c79b5cbbeb1;p=openvswitch tunneling: Fix uninitialized variable warning in check_mtu. The MTU is only needed if we are doing PMTUD but some compilers complain that it could be used uninitialized. Reported-by: Justin Pettit Signed-off-by: Jesse Gross Acked-by: Ben Pfaff --- diff --git a/datapath/tunnel.c b/datapath/tunnel.c index 6d0e7b9c..7bf46e07 100644 --- a/datapath/tunnel.c +++ b/datapath/tunnel.c @@ -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);