[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ka3dhrfkc42ydbiiqa4ygr545ndydcpekjco36sdwf2nypuy33@vpsgevacmzjv>
Date: Thu, 4 Sep 2025 00:04:40 -1000
From: Joey Pabalinas <joeypabalinas@...il.com>
To: Kiryl Shutsemau <kirill@...temov.name>
Cc: linux-kernel@...r.kernel.org, linux-mm@...ck.org,
Kees Cook <kees@...nel.org>
Subject: Re: [PATCH] fork: simplify overcomplicated if conditions
On Thu, Sep 04, 2025 at 10:56:44AM +0100, Kiryl Shutsemau wrote:
> On Wed, Sep 03, 2025 at 08:46:29PM -1000, Joey Pabalinas wrote:
> > Since `((a & (b|c)) == (b|c))` is the same thing as `(a & (b|c))`, use
> > the second version which is simpler.
>
> Huh? No it is not the same thing.
>
> a = 1;
> b = 1;
> c = 2;
>
> (a & (b|c)) is 1 which is true.
> ((a & (b|c)) == (b|c)) is false.
Ah, you are right. My mistake.
--
Cheers,
Joey Pabalinas
Download attachment "signature.asc" of type "application/pgp-signature" (834 bytes)
Powered by blists - more mailing lists