diff options
author | Michael Straube <straube.linux@gmail.com> | 2019-10-26 15:11:33 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-10-26 21:45:48 +0300 |
commit | dd85035172d081e7dc98d03331340e911c44a832 (patch) | |
tree | 3f82c40cdef277d020583daa6728fa8cdb77c528 | |
parent | 4e6f391fde3410fb4141261d45333217c22230d4 (diff) | |
download | linux-dd85035172d081e7dc98d03331340e911c44a832.tar.xz |
staging: rtl8188eu: remove ternary operator
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>
-rw-r--r-- | drivers/staging/rtl8188eu/core/rtw_sta_mgt.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/rtl8188eu/core/rtw_sta_mgt.c b/drivers/staging/rtl8188eu/core/rtw_sta_mgt.c index 282c835a635c..3cadc46836e1 100644 --- a/drivers/staging/rtl8188eu/core/rtw_sta_mgt.c +++ b/drivers/staging/rtl8188eu/core/rtw_sta_mgt.c @@ -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; |