mirror of
https://github.com/proski/madwifi
synced 2024-11-21 14:01:54 +03:00
Use "%s" in err() calls to fix a warning on Ubuntu 10.04
err() would be confused if the interface name has formatting characters. git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@4179 0192ed92-7a03-0410-a25b-9323aeb14dbd
This commit is contained in:
parent
35db352fc7
commit
f72edc7741
@ -284,7 +284,7 @@ main(int argc, char *argv[])
|
||||
/* no args, just show global stats */
|
||||
ifr.ifr_data = (caddr_t) &stats;
|
||||
if (ioctl(s, SIOCG80211STATS, &ifr) < 0)
|
||||
err(1, ifr.ifr_name);
|
||||
err(1, "%s", ifr.ifr_name);
|
||||
printstats(stdout, &stats);
|
||||
return 0;
|
||||
}
|
||||
|
@ -285,9 +285,9 @@ main(int argc, char *argv[])
|
||||
if (line != 0) {
|
||||
ifr.ifr_data = (caddr_t) &cur;
|
||||
if (ioctl(s, SIOCGATHSTATS, &ifr) < 0)
|
||||
err(1, ifr.ifr_name);
|
||||
err(1, "%s", ifr.ifr_name);
|
||||
if (!getifstats(ifr.ifr_name, &icur, &ocur))
|
||||
err(1, ifr.ifr_name);
|
||||
err(1, "%s", ifr.ifr_name);
|
||||
printf("%8lu %8lu %7u %7u %7u %6u %6u %6u %7u %4u %3uM\n",
|
||||
(icur - itot) -
|
||||
(cur.ast_rx_mgt - total.ast_rx_mgt),
|
||||
@ -307,9 +307,9 @@ main(int argc, char *argv[])
|
||||
} else {
|
||||
ifr.ifr_data = (caddr_t) &total;
|
||||
if (ioctl(s, SIOCGATHSTATS, &ifr) < 0)
|
||||
err(1, ifr.ifr_name);
|
||||
err(1, "%s", ifr.ifr_name);
|
||||
if (!getifstats(ifr.ifr_name, &itot, &otot))
|
||||
err(1, ifr.ifr_name);
|
||||
err(1, "%s", ifr.ifr_name);
|
||||
printf("%8lu %8lu %7u %7u %7u %6u %6u %6u %7u %4u %3uM\n",
|
||||
itot - total.ast_rx_mgt,
|
||||
otot,
|
||||
@ -344,7 +344,7 @@ main(int argc, char *argv[])
|
||||
|
||||
ifr.ifr_data = (caddr_t) &stats;
|
||||
if (ioctl(s, SIOCGATHSTATS, &ifr) < 0)
|
||||
err(1, ifr.ifr_name);
|
||||
err(1, "%s", ifr.ifr_name);
|
||||
printstats(stdout, &stats);
|
||||
}
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user