From 05283e7a6f71fb036957eb088b68e4f94ad833ac Mon Sep 17 00:00:00 2001 From: Sabrina Dubroca Date: Mon, 15 Aug 2016 11:43:42 +0200 Subject: [PATCH] mka: Simplify ieee802_1x_mka_dist_sak_body_present() No need for an if statement to figure out Boolean return value. Signed-off-by: Sabrina Dubroca --- src/pae/ieee802_1x_kay.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/pae/ieee802_1x_kay.c b/src/pae/ieee802_1x_kay.c index d29187dc8..88fb9cec5 100644 --- a/src/pae/ieee802_1x_kay.c +++ b/src/pae/ieee802_1x_kay.c @@ -1395,10 +1395,7 @@ static Boolean ieee802_1x_mka_dist_sak_body_present( struct ieee802_1x_mka_participant *participant) { - if (!participant->to_dist_sak || !participant->new_key) - return FALSE; - - return TRUE; + return participant->to_dist_sak && participant->new_key; }