Browse Source

Get rid of couple of shadowed variable warnings

Jouni Malinen 16 years ago
parent
commit
3067ac2bb8
2 changed files with 8 additions and 8 deletions
  1. 4 4
      hostapd/config.c
  2. 4 4
      hostapd/driver_nl80211.c

+ 4 - 4
hostapd/config.c

@@ -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;
 				}
 			}

+ 4 - 4
hostapd/driver_nl80211.c

@@ -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)) {