aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJouni Malinen <jouni.malinen@atheros.com>2009-03-26 17:23:02 (GMT)
committerJouni Malinen <j@w1.fi>2009-04-20 09:01:22 (GMT)
commitc4d368d8884391d58b849e09266347a558c04475 (patch)
tree1f49dfb9f020370d9c28843493d6b11148bf5df2
parent8d2e8fb0a396a58f9faad20317e956e419422d14 (diff)
downloadhostap-06-c4d368d8884391d58b849e09266347a558c04475.zip
hostap-06-c4d368d8884391d58b849e09266347a558c04475.tar.gz
hostap-06-c4d368d8884391d58b849e09266347a558c04475.tar.bz2
Get rid of couple of shadowed variable warnings
(cherry picked from commit 3067ac2bb82553c99cb84e32ede82de434ee1070)
-rw-r--r--hostapd/config.c8
-rw-r--r--hostapd/driver_nl80211.c8
2 files changed, 8 insertions, 8 deletions
diff --git a/hostapd/config.c b/hostapd/config.c
index 6ad14d2..a9e47d1 100644
--- a/hostapd/config.c
+++ b/hostapd/config.c
@@ -1452,13 +1452,13 @@ struct hostapd_config * hostapd_config_read(const char *fname)
} else if (os_strcmp(buf, "bridge") == 0) {
os_strlcpy(bss->bridge, pos, sizeof(bss->bridge));
} else if (os_strcmp(buf, "driver") == 0) {
- int i;
+ int j;
/* clear to get error below if setting is invalid */
conf->driver = NULL;
- for (i = 0; hostapd_drivers[i]; i++) {
- if (os_strcmp(pos, hostapd_drivers[i]->name) ==
+ for (j = 0; hostapd_drivers[j]; i++) {
+ if (os_strcmp(pos, hostapd_drivers[j]->name) ==
0) {
- conf->driver = hostapd_drivers[i];
+ conf->driver = hostapd_drivers[j];
break;
}
}
diff --git a/hostapd/driver_nl80211.c b/hostapd/driver_nl80211.c
index ca1780c..d4802ac 100644
--- a/hostapd/driver_nl80211.c
+++ b/hostapd/driver_nl80211.c
@@ -2380,7 +2380,7 @@ static void hostapd_wireless_event_rtm_newlink(struct i802_driver_data *drv,
struct nlmsghdr *h, int len)
{
struct ifinfomsg *ifi;
- int attrlen, nlmsg_len, rta_len;
+ int attrlen, _nlmsg_len, rta_len;
struct rtattr *attr;
if (len < (int) sizeof(*ifi))
@@ -2391,13 +2391,13 @@ static void hostapd_wireless_event_rtm_newlink(struct i802_driver_data *drv,
/* TODO: use ifi->ifi_index to filter out wireless events from other
* interfaces */
- nlmsg_len = NLMSG_ALIGN(sizeof(struct ifinfomsg));
+ _nlmsg_len = NLMSG_ALIGN(sizeof(struct ifinfomsg));
- attrlen = h->nlmsg_len - nlmsg_len;
+ attrlen = h->nlmsg_len - _nlmsg_len;
if (attrlen < 0)
return;
- attr = (struct rtattr *) (((char *) ifi) + nlmsg_len);
+ attr = (struct rtattr *) (((char *) ifi) + _nlmsg_len);
rta_len = RTA_ALIGN(sizeof(struct rtattr));
while (RTA_OK(attr, attrlen)) {