aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSabrina Dubroca <sd@queasysnail.net>2016-08-15 09:43:41 (GMT)
committerJouni Malinen <j@w1.fi>2016-08-28 16:49:57 (GMT)
commitd9639d1a4e39c45a2ce90df363a2f0e3defa11b8 (patch)
tree3650b918c89c4ed1e807175563f5936dec274f63
parent7c547cff6b7fc0ade64020ac38f08cd892b78bba (diff)
downloadhostap-d9639d1a4e39c45a2ce90df363a2f0e3defa11b8.zip
hostap-d9639d1a4e39c45a2ce90df363a2f0e3defa11b8.tar.gz
hostap-d9639d1a4e39c45a2ce90df363a2f0e3defa11b8.tar.bz2
mka: Clean up ieee802_1x_kay_get_cipher_suite() lookup function
Signed-off-by: Sabrina Dubroca <sd@queasysnail.net>
-rw-r--r--src/pae/ieee802_1x_kay.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/pae/ieee802_1x_kay.c b/src/pae/ieee802_1x_kay.c
index c7dd025..fd45c02 100644
--- a/src/pae/ieee802_1x_kay.c
+++ b/src/pae/ieee802_1x_kay.c
@@ -383,12 +383,10 @@ ieee802_1x_kay_get_cipher_suite(struct ieee802_1x_mka_participant *participant,
for (i = 0; i < CS_TABLE_SIZE; i++) {
if (os_memcmp(cipher_suite_tbl[i].id, cs_id, CS_ID_LEN) == 0)
- break;
+ return &cipher_suite_tbl[i];
}
- if (i >= CS_TABLE_SIZE)
- return NULL;
- return &cipher_suite_tbl[i];
+ return NULL;
}