From: Zamir, Roee Date: Thu, 23 Mar 2017 10:13:11 +0000 (+0200) Subject: iw: nan: fix warning of uninitialized variable X-Git-Tag: v5.0~12 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ed3552e5cee710af8371a19d30933f99d1b02833;p=thirdparty%2Fiw.git iw: nan: fix warning of uninitialized variable Signed-off-by: Zamir, Roee Signed-off-by: Johannes Berg --- diff --git a/nan.c b/nan.c index e557ac0..cb132b1 100755 --- a/nan.c +++ b/nan.c @@ -190,7 +190,7 @@ static int parse_srf(char **argv, int argc, struct nl_msg *func_attrs) struct nl_msg *srf_attrs; int old_argc = argc; unsigned char mac_addr[ETH_ALEN]; - char *cur_mac, *sptr; + char *cur_mac, *sptr = NULL; srf_attrs = nlmsg_alloc(); if (strcmp(argv[0], "include") == 0) @@ -273,7 +273,7 @@ nla_put_failure: static void parse_match_filter(char *filter, struct nl_msg *func_attrs, int tx) { struct nlattr *nl_filt; - char *cur_filt, *sptr; + char *cur_filt, *sptr = NULL; int i = 0; if (tx)