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: <bff9626d-095c-4bed-ae8b-2be50610aee7@kili.mountain>
Date:   Thu, 6 Apr 2023 18:06:28 +0300
From:   Dan Carpenter <error27@...il.com>
To:     Sumitra Sharma <sumitraartsy@...il.com>
Cc:     Manish Chopra <manishc@...vell.com>, GR-Linux-NIC-Dev@...vell.com,
        Coiby Xu <coiby.xu@...il.com>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        netdev@...r.kernel.org, linux-staging@...ts.linux.dev,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] staging: qlge: Remove macro FILL_SEG

On Wed, Apr 05, 2023 at 08:06:27AM -0700, Sumitra Sharma wrote:
> +	err = err || qlge_fill_seg_(fmsg, &dump->core_regs_seg_hdr, dump->mpi_core_regs);

I have not seen anyone do this before.  I sometimes see people do:

	err |= frob1();
	err |= frob2();
	err |= frob3();

I don't like this very much, but it basically works-ish...  I don't like
that it ORs all the errors together and that it continues after it has
errors.

Another idea would be to do:

	err = err ?: frob1();
	err = err ?: frob2();
	err = err ?: frob3();

BPF and networking have a couple place which do it this way so maybe
it's going to become trendy.

regards,
dan carpenter

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ