summaryrefslogtreecommitdiffstats
path: root/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c
diff options
context:
space:
mode:
authorIvan Safonov2015-10-27 16:19:50 +0100
committerGreg Kroah-Hartman2015-10-29 01:09:08 +0100
commit530c9b1b21fc41fd54c1c4f0f4b05368304c0105 (patch)
tree887e45a20752c7047cc78c76ed5db9582dd542a9 /drivers/staging/rtl8188eu/core/rtw_mlme_ext.c
parentstaging: rtl8188eu: ternary operator (?:) replaced by min_t kernel macro (diff)
downloadkernel-qcow2-linux-530c9b1b21fc41fd54c1c4f0f4b05368304c0105.tar.gz
kernel-qcow2-linux-530c9b1b21fc41fd54c1c4f0f4b05368304c0105.tar.xz
kernel-qcow2-linux-530c9b1b21fc41fd54c1c4f0f4b05368304c0105.zip
staging: rtl8188eu: ternary operator (?:) replaced by min_t kernel macro
min_t macro better conveys the meaning of the code. Signed-off-by: Ivan Safonov <insafonov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/rtl8188eu/core/rtw_mlme_ext.c')
-rw-r--r--drivers/staging/rtl8188eu/core/rtw_mlme_ext.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c b/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c
index cc5806f9229a..4e6f1a87d625 100644
--- a/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c
+++ b/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c
@@ -3239,7 +3239,7 @@ static unsigned int OnAssocReq(struct adapter *padapter,
pstat->flags |= WLAN_STA_WPS;
copy_len = 0;
} else {
- copy_len = ((wpa_ie_len+2) > sizeof(pstat->wpa_ie)) ? (sizeof(pstat->wpa_ie)) : (wpa_ie_len+2);
+ copy_len = min_t(int, wpa_ie_len + 2, sizeof(pstat->wpa_ie));
}
if (copy_len > 0)
memcpy(pstat->wpa_ie, wpa_ie-2, copy_len);