Use a single define for maximum number of EAP methods
This cleans up the code a bit by not having to deal with theoretical possibility of maximum number of EAP methods to be different between various components in hostapd. Signed-hostap: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
895c643407
commit
e9447a94c0
6 changed files with 9 additions and 15 deletions
|
@ -1568,7 +1568,7 @@ static int ieee802_1x_get_eap_user(void *ctx, const u8 *identity,
|
|||
{
|
||||
struct hostapd_data *hapd = ctx;
|
||||
const struct hostapd_eap_user *eap_user;
|
||||
int i, count;
|
||||
int i;
|
||||
|
||||
eap_user = hostapd_get_eap_user(hapd->conf, identity,
|
||||
identity_len, phase2);
|
||||
|
@ -1577,10 +1577,7 @@ static int ieee802_1x_get_eap_user(void *ctx, const u8 *identity,
|
|||
|
||||
os_memset(user, 0, sizeof(*user));
|
||||
user->phase2 = phase2;
|
||||
count = EAP_USER_MAX_METHODS;
|
||||
if (count > EAP_MAX_METHODS)
|
||||
count = EAP_MAX_METHODS;
|
||||
for (i = 0; i < count; i++) {
|
||||
for (i = 0; i < EAP_MAX_METHODS; i++) {
|
||||
user->methods[i].vendor = eap_user->methods[i].vendor;
|
||||
user->methods[i].method = eap_user->methods[i].method;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue