madwifi: fix scan-build warning
authorRuben Kerkhof <ruben@rubenkerkhof.com>
Wed, 3 Aug 2016 17:10:04 +0000 (19:10 +0200)
committerRuben Kerkhof <ruben@rubenkerkhof.com>
Wed, 3 Aug 2016 17:10:04 +0000 (19:10 +0200)
CC       madwifi.lo
madwifi.c:608:2: warning: Function call argument is an uninitialized
value
        ssnprintf (buf, bufsize, "%02x:%02x:%02x:%02x:%02x:%02x",
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.

src/madwifi.c

index 753ad16..19ece7f 100644 (file)
@@ -752,7 +752,7 @@ process_station (int sk, const char *dev, struct ieee80211req_sta_info *si)
 static int
 process_stations (int sk, const char *dev)
 {
-       uint8_t buf[24*1024];
+       uint8_t buf[24*1024] = { 0 };
        uint8_t *cp;
        int nodes;
        size_t len;