Get rid of couple of shadowed variable warnings

This commit is contained in:
Jouni Malinen 2009-03-26 19:23:02 +02:00 committed by Jouni Malinen
parent 21db94c5dc
commit 3067ac2bb8
2 changed files with 8 additions and 8 deletions

View file

@ -1458,13 +1458,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;
}
}

View file

@ -2804,7 +2804,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))
@ -2815,13 +2815,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)) {