lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Sun, 30 Oct 2022 11:40:17 +0100
From:   Philipp Hortmann <philipp.g.hortmann@...il.com>
To:     Michael Straube <straube.linux@...il.com>,
        gregkh@...uxfoundation.org
Cc:     Larry.Finger@...inger.net, phil@...lpotter.co.uk,
        linux-staging@...ts.linux.dev, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] staging: r8188eu: use min() instead of ternary operator

On 10/30/22 09:10, Michael Straube wrote:
> Replace a ternary operator usage with the min() macro to improve
> readability.
> 
> Signed-off-by: Michael Straube <straube.linux@...il.com>
> ---
>   drivers/staging/r8188eu/os_dep/ioctl_linux.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> 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);

Tested-by: Philipp Hortmann <philipp.g.hortmann@...il.com> # Edimax N150

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ