summaryrefslogtreecommitdiffstats
path: root/usr.sbin
diff options
context:
space:
mode:
authorsam <sam@FreeBSD.org>2008-05-28 23:37:37 +0000
committersam <sam@FreeBSD.org>2008-05-28 23:37:37 +0000
commit1322406ed1a845343543e57df1c694e5f1c198cc (patch)
treeb0735b8480448f8b5f2f646162c93dc503ec31c0 /usr.sbin
parent6895bcfa9fca7c0ff863d6e03967998c0a774d28 (diff)
downloadFreeBSD-src-1322406ed1a845343543e57df1c694e5f1c198cc.zip
FreeBSD-src-1322406ed1a845343543e57df1c694e5f1c198cc.tar.gz
misc cleanups for stricter compilation
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/wlandebug/wlandebug.c18
1 files changed, 4 insertions, 14 deletions
diff --git a/usr.sbin/wlandebug/wlandebug.c b/usr.sbin/wlandebug/wlandebug.c
index bb9d843..c421cf8 100644
--- a/usr.sbin/wlandebug/wlandebug.c
+++ b/usr.sbin/wlandebug/wlandebug.c
@@ -34,6 +34,7 @@
* (default interface is wlan.0).
*/
#include <sys/types.h>
+#include <sys/sysctl.h>
#include <stdio.h>
#include <stdlib.h>
@@ -126,17 +127,6 @@ getflag(const char *name, int len)
return 0;
}
-static const char *
-getflagname(u_int flag)
-{
- int i;
-
- for (i = 0; i < N(flags); i++)
- if (flags[i].bit == flag)
- return flags[i].name;
- return "???";
-}
-
static void
usage(void)
{
@@ -162,7 +152,7 @@ setoid(char oid[], size_t oidlen, const char *wlan)
snprintf(oid, oidlen, "net.wlan.debug");
#elif __NetBSD__
if (wlan)
- snprintf(oid, oidlen, "net.link.ieee80211.%s.debug", wlan+4);
+ snprintf(oid, oidlen, "net.link.ieee80211.%s.debug", wlan);
else
snprintf(oid, oidlen, "net.link.ieee80211.debug");
#else
@@ -175,9 +165,9 @@ main(int argc, char *argv[])
{
const char *cp, *tp;
const char *sep;
- int op, i, unit;
+ int op, i;
u_int32_t debug, ndebug;
- size_t debuglen, parentlen;
+ size_t debuglen;
char oid[256];
progname = argv[0];
OpenPOWER on IntegriCloud