Re: [PATCH] libsepol: Use spaceship comparison operator when comparing ibpkeys

Stephen Smalley <[email protected]>
Newsgroups org.kernel.vger.selinux
Message-ID <CAEjxPJ4tW4M7rEVo=acwe_duivvQi=uYrOscHk4Dt7czvHN19w@mail.gmail.com>
On Wed, Aug 12, 2026 at 3:18 PM Stephen Smalley
<[email protected]> wrote:
>
> On Wed, Aug 12, 2026 at 2:28 PM James Carter <[email protected]> wrote:
> >
> > The comparsion function for ibpkeys in kernel_to_common subtracts
> > the subnet_prefixes of the two ibpkeys which are unsigned 64-bit
> > values and stores the result in an int which might not be able
> > to contain the result.
> >
> > Use the spaceship comparison operator to compare the subnet_prefxes
> > to avoid any issues.
> >
> > Signed-off-by: James Carter <[email protected]>
>
> Acked-by: Stephen Smalley <[email protected]>

Thanks, merged.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.