Remove an extra level of indentation in hostapd_acl_cache_get()

Signed-hostap: Jouni Malinen <j@w1.fi>
This commit is contained in:
Jouni Malinen 2012-08-19 13:46:23 +03:00
parent 99be648c5d
commit bd1410197e

View file

@ -73,16 +73,16 @@ static int hostapd_acl_cache_get(struct hostapd_data *hapd, const u8 *addr,
struct os_time now;
os_get_time(&now);
entry = hapd->acl_cache;
while (entry) {
if (os_memcmp(entry->addr, addr, ETH_ALEN) == 0) {
for (entry = hapd->acl_cache; entry; entry = entry->next) {
if (os_memcmp(entry->addr, addr, ETH_ALEN) != 0)
continue;
if (now.sec - entry->timestamp > RADIUS_ACL_TIMEOUT)
return -1; /* entry has expired */
if (entry->accepted == HOSTAPD_ACL_ACCEPT_TIMEOUT)
if (session_timeout)
*session_timeout =
entry->session_timeout;
*session_timeout = entry->session_timeout;
if (acct_interim_interval)
*acct_interim_interval =
entry->acct_interim_interval;
@ -95,9 +95,6 @@ static int hostapd_acl_cache_get(struct hostapd_data *hapd, const u8 *addr,
return entry->accepted;
}
entry = entry->next;
}
return -1;
}
#endif /* CONFIG_NO_RADIUS */