]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
staging: rtl8188eu: remove ternary operator
authorMichael Straube <straube.linux@gmail.com>
Sat, 26 Oct 2019 12:11:33 +0000 (14:11 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 26 Oct 2019 18:45:48 +0000 (20:45 +0200)
Instead of using ternary operator to set variable res, use the value
of variable match (or the negation) directly to simplify the code and
improve readability.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20191026121135.181897-5-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8188eu/core/rtw_sta_mgt.c

index 282c835a635c02d4f3a25fe13dd129ee5e66bba2..3cadc46836e1e04683e83f137f2f17ce6caf3d62 100644 (file)
@@ -504,9 +504,9 @@ bool rtw_access_ctrl(struct adapter *padapter, u8 *mac_addr)
        spin_unlock_bh(&pacl_node_q->lock);
 
        if (pacl_list->mode == 1)/* accept unless in deny list */
-               res = (match) ? false : true;
+               res = !match;
        else if (pacl_list->mode == 2)/* deny unless in accept list */
-               res = (match) ? true : false;
+               res = match;
        else
                res = true;