PERFORCE change 141983 for review

Sam Leffler sam at FreeBSD.org
Wed May 21 18:11:01 UTC 2008


http://perforce.freebsd.org/chv.cgi?CH=141983

Change 141983 by sam at sam_ebb on 2008/05/21 18:10:44

	misc cleanups for stricter compilation

Affected files ...

.. //depot/projects/vap/usr.sbin/wlandebug/wlandebug.c#7 edit

Differences ...

==== //depot/projects/vap/usr.sbin/wlandebug/wlandebug.c#7 (text+ko) ====

@@ -41,6 +41,7 @@
  * (default interface is wlan.0).
  */
 #include <sys/types.h>
+#include <sys/sysctl.h>
 
 #include <stdio.h>
 #include <stdlib.h>
@@ -133,17 +134,6 @@
 	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)
 {
@@ -169,7 +159,7 @@
 		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
@@ -182,9 +172,9 @@
 {
 	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];


More information about the p4-projects mailing list