From: Sabrina Dubroca Date: Mon, 15 Aug 2016 09:43:41 +0000 (+0200) Subject: mka: Clean up ieee802_1x_kay_get_cipher_suite() lookup function X-Git-Tag: hostap_2_6~95 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d9639d1a4e39c45a2ce90df363a2f0e3defa11b8;p=thirdparty%2Fhostap.git mka: Clean up ieee802_1x_kay_get_cipher_suite() lookup function Signed-off-by: Sabrina Dubroca --- diff --git a/src/pae/ieee802_1x_kay.c b/src/pae/ieee802_1x_kay.c index c7dd0259d..fd45c02eb 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; }