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] [thread-next>] [day] [month] [year] [list]
Message-ID: <0641d577f58f836a6c14a73e78d4545e44e61631.camel@perches.com>
Date:   Fri, 25 Mar 2022 19:23:16 -0700
From:   Joe Perches <joe@...ches.com>
To:     Wei Li <liwei391@...wei.com>, Peter Kaestle <peter@...e.net>,
        Hans de Goede <hdegoede@...hat.com>,
        Mark Gross <markgross@...nel.org>
Cc:     platform-driver-x86@...r.kernel.org, linux-kernel@...r.kernel.org,
        rui.xiang@...wei.com
Subject: Re: [PATCH] platform/x86: acerhdf: Cleanup str_starts_with()

On Sat, 2022-03-26 at 10:02 +0800, Wei Li wrote:
> Since there is already a generic function strstarts() that check if a
> string starts with a given prefix, cleanup str_starts_with().
[]
> diff --git a/drivers/platform/x86/acerhdf.c b/drivers/platform/x86/acerhdf.c
> @@ -651,9 +636,9 @@ static int __init acerhdf_check_hardware(void)
>  		 * check if actual hardware BIOS vendor, product and version
>  		 * IDs start with the strings of BIOS table entry
>  		 */
> -		if (str_starts_with(vendor, bt->vendor) &&
> -				str_starts_with(product, bt->product) &&
> -				str_starts_with(version, bt->version)) {
> +		if (strstarts(vendor, bt->vendor) &&
> +				strstarts(product, bt->product) &&
> +				strstarts(version, bt->version)) {

IMO: It'd be easier for humans to read if aligned like:

		if (strstarts(vendor, bt->vendor) &&
		    strstarts(product, bt->product) &&
		    strstarts(version, bt->version)) {


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ