]> git.ipfire.org Git - thirdparty/iw.git/commitdiff
iw: nan: fix warning of uninitialized variable
authorZamir, Roee <roee.zamir@intel.com>
Thu, 23 Mar 2017 10:13:11 +0000 (12:13 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Thu, 11 Oct 2018 10:38:11 +0000 (12:38 +0200)
Signed-off-by: Zamir, Roee <roee.zamir@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
nan.c

diff --git a/nan.c b/nan.c
index e557ac0a6d2bf6e6530ff0fe99be0743157b7b2a..cb132b142208960a2eab9d230bb015f4b8c1a090 100755 (executable)
--- 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)