[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tzjq757k4tt7k2mkcapttjuax6zgzr3nl7ivusuvxfmok5kvb4@vub2gw7vp7vu>
Date: Thu, 4 Sep 2025 10:56:44 +0100
From: Kiryl Shutsemau <kirill@...temov.name>
To: Joey Pabalinas <joeypabalinas@...il.com>
Cc: linux-kernel@...r.kernel.org, linux-mm@...ck.org,
Kees Cook <kees@...nel.org>
Subject: Re: [PATCH] fork: simplify overcomplicated if conditions
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.
--
Kiryl Shutsemau / Kirill A. Shutemov
Powered by blists - more mailing lists