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]
Message-ID: <eff06531-0b72-47fc-9f1a-dfa87a49b751@vivo.com>
Date: Thu, 22 Aug 2024 17:39:55 +0800
From: Yang Ruibin <11162571@...o.com>
To: Marcel Holtmann <marcel@...tmann.org>,
 Johan Hedberg <johan.hedberg@...il.com>,
 Luiz Augusto von Dentz <luiz.dentz@...il.com>,
 Stephen Rothwell <sfr@...b.auug.org.au>, linux-bluetooth@...r.kernel.org,
 linux-kernel@...r.kernel.org
Cc: opensource.kernel@...o.com
Subject: Re: [PATCH v1] net:hidp:Use min macro

Sorry, please ignore this patch.
Because the corresponding header file is not included, there may be 
compilation errors.

在 2024/8/22 15:54, Yang Ruibin 写道:
> Instead of using the min() implementation of
> the ternary operator, use real macros.
>
> Signed-off-by: Yang Ruibin <11162571@...o.com>
> ---
>   net/bluetooth/hidp/core.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/net/bluetooth/hidp/core.c b/net/bluetooth/hidp/core.c
> index 707f229f8..7bf24f299 100644
> --- a/net/bluetooth/hidp/core.c
> +++ b/net/bluetooth/hidp/core.c
> @@ -294,7 +294,7 @@ static int hidp_get_raw_report(struct hid_device *hid,
>   
>   	skb = session->report_return;
>   	if (skb) {
> -		len = skb->len < count ? skb->len : count;
> +		len = min(skb->len, count);
>   		memcpy(data, skb->data, len);
>   
>   		kfree_skb(skb);

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ