diff options
author | brucec <brucec@FreeBSD.org> | 2011-03-11 19:32:15 +0000 |
---|---|---|
committer | brucec <brucec@FreeBSD.org> | 2011-03-11 19:32:15 +0000 |
commit | 71e24b546bbaa4c291beddbaceec612943e36b4f (patch) | |
tree | 7d7fc90cafc166ab4b0153c56ddd8120793b88dd /tools | |
parent | 46a12ed0406dd094b4e6972f9cd98f1716624fd5 (diff) | |
download | FreeBSD-src-71e24b546bbaa4c291beddbaceec612943e36b4f.zip FreeBSD-src-71e24b546bbaa4c291beddbaceec612943e36b4f.tar.gz |
Fix warnings and style(9) issues.
Set WARNS to 6.
Diffstat (limited to 'tools')
-rw-r--r-- | tools/tools/iwi/Makefile | 1 | ||||
-rw-r--r-- | tools/tools/iwi/iwistats.c | 9 |
2 files changed, 6 insertions, 4 deletions
diff --git a/tools/tools/iwi/Makefile b/tools/tools/iwi/Makefile index 2bfaac6..9ad0681 100644 --- a/tools/tools/iwi/Makefile +++ b/tools/tools/iwi/Makefile @@ -2,5 +2,6 @@ PROG= iwistats NO_MAN= +WARNS?=6 .include <bsd.prog.mk> diff --git a/tools/tools/iwi/iwistats.c b/tools/tools/iwi/iwistats.c index 7e69054..1034dac7 100644 --- a/tools/tools/iwi/iwistats.c +++ b/tools/tools/iwi/iwistats.c @@ -113,16 +113,17 @@ get_statistics(const char *iface) static uint32_t stats[256]; const struct statistic *stat; char oid[32]; - int ifaceno, len; + size_t len; + int ifaceno; if (sscanf(iface, "iwi%u", &ifaceno) != 1) errx(EX_DATAERR, "Invalid interface name '%s'", iface); - len = sizeof stats; - (void)snprintf(oid, sizeof oid, "dev.iwi.%u.stats", ifaceno); + len = sizeof(stats); + (void)snprintf(oid, sizeof(oid), "dev.iwi.%u.stats", ifaceno); if (sysctlbyname(oid, stats, &len, NULL, 0) == -1) err(EX_OSERR, "Can't retrieve statistics"); for (stat = tbl; stat->index != -1; stat++) - (void)printf("%-60s[%lu]\n", stat->desc, stats[stat->index]); + (void)printf("%-60s[%u]\n", stat->desc, stats[stat->index]); } |