Get rid of couple of shadowed variable warnings
authorJouni Malinen <jouni.malinen@atheros.com>
Thu, 26 Mar 2009 17:23:02 +0000 (19:23 +0200)
committerJouni Malinen <j@w1.fi>
Thu, 26 Mar 2009 17:23:02 +0000 (19:23 +0200)
hostapd/config.c
hostapd/driver_nl80211.c

index 043fd59..d01514b 100644 (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;
                                }
                        }
index 5e5ffa0..d76b456 100644 (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)) {