提交 b4201cc4 编写于 作者: J Jeff Mahoney 提交者: Johannes Berg

mac80211: fix "warning: ‘target_metric’ may be used uninitialized"

This fixes:

net/mac80211/mesh_hwmp.c:603:26: warning: ‘target_metric’ may be used uninitialized in this function

target_metric is only consumed when reply = true so no bug exists here,
but not all versions of gcc realize it.  Initialize to 0 to remove the
warning.
Signed-off-by: NJeff Mahoney <jeffm@suse.com>
Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
上级 f6d4671a
......@@ -530,7 +530,7 @@ static void hwmp_preq_frame_process(struct ieee80211_sub_if_data *sdata,
const u8 *target_addr, *orig_addr;
const u8 *da;
u8 target_flags, ttl, flags;
u32 orig_sn, target_sn, lifetime, target_metric;
u32 orig_sn, target_sn, lifetime, target_metric = 0;
bool reply = false;
bool forward = true;
bool root_is_gate;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册