]> git.ipfire.org Git - thirdparty/iw.git/blobdiff - phy.c
iw: don't use NULL pointer in nla_nest_end()
[thirdparty/iw.git] / phy.c
diff --git a/phy.c b/phy.c
index 19f9cebd2587fd15d1b37fd1def403700afb55ca..13e8260ed78a9f4519dbd9833ef970735c0e896a 100644 (file)
--- a/phy.c
+++ b/phy.c
@@ -1,6 +1,5 @@
 #include <stdbool.h>
 #include <errno.h>
-#include <net/if.h>
 #include <strings.h>
 #include <sys/param.h>
 #include <sys/stat.h>
@@ -45,7 +44,7 @@ static int handle_freqs(struct nl_msg *msg, int argc, char **argv)
                { .name = "160", .val = NL80211_CHAN_WIDTH_160, },
        };
        uint32_t freq;
-       int i, bwval = NL80211_CHAN_WIDTH_20_NOHT;
+       unsigned int i, bwval = NL80211_CHAN_WIDTH_20_NOHT;
        char *end;
 
        if (argc < 1)
@@ -104,7 +103,7 @@ static int handle_freqchan(struct nl_msg *msg, bool chan,
        };
        unsigned int htval = NL80211_CHAN_NO_HT;
        unsigned int freq;
-       int i;
+       unsigned int i;
 
        if (!argc || argc > 4)
                return 1;
@@ -299,7 +298,7 @@ COMMAND(set, retry, "[short <limit>] [long <limit>]",
 #ifndef NETNS_RUN_DIR
 #define NETNS_RUN_DIR "/var/run/netns"
 #endif
-int netns_get_fd(const char *name)
+static int netns_get_fd(const char *name)
 {
        char pathbuf[MAXPATHLEN];
        const char *path, *ptr;