diff options
| author | Michael Straube <straube.linux@gmail.com> | 2022-10-30 09:10:20 +0100 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-10-31 09:04:22 +0100 |
| commit | 737143dc87dfd3cb600a46092387c9caa814ce88 (patch) | |
| tree | c5fb9875bcc121cdf5a2e6f5b2e0583681c03eef | |
| parent | 2fe5dc3dcc2920669217e3696ec15fec6630a92f (diff) | |
| download | linux-737143dc87dfd3cb600a46092387c9caa814ce88.tar.gz linux-737143dc87dfd3cb600a46092387c9caa814ce88.zip | |
staging: r8188eu: use min() instead of ternary operator
Replace a ternary operator usage with the min() macro to improve
readability.
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20221030081020.8533-1-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| -rw-r--r-- | drivers/staging/r8188eu/os_dep/ioctl_linux.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/r8188eu/os_dep/ioctl_linux.c b/drivers/staging/r8188eu/os_dep/ioctl_linux.c index 8516e253bb03..22aab3f986b4 100644 --- a/drivers/staging/r8188eu/os_dep/ioctl_linux.c +++ b/drivers/staging/r8188eu/os_dep/ioctl_linux.c @@ -3568,7 +3568,7 @@ static int rtw_wx_set_priv(struct net_device *dev, if ((_VENDOR_SPECIFIC_IE_ == probereq_wpsie[0]) && (!memcmp(&probereq_wpsie[2], wps_oui, 4))) { - cp_sz = probereq_wpsie_len > MAX_WPS_IE_LEN ? MAX_WPS_IE_LEN : probereq_wpsie_len; + cp_sz = min(probereq_wpsie_len, MAX_WPS_IE_LEN); pmlmepriv->wps_probe_req_ie_len = 0; kfree(pmlmepriv->wps_probe_req_ie); |
