Re: BUG #18914: REDUNDANT_COMPARISON.ALWAYS_FALSE Redundant comparison '0' > 'nb' (0 > {4, 16}) is always false - Mailing list pgsql-bugs

From David Rowley
Subject Re: BUG #18914: REDUNDANT_COMPARISON.ALWAYS_FALSE Redundant comparison '0' > 'nb' (0 > {4, 16}) is always false
Date
Msg-id CAApHDvox1wd1=2yPdgcW2RNhNWMbppc8Y1=qq=AzngxaNpiGkA@mail.gmail.com
Whole thread Raw
List pgsql-bugs
On Wed, 7 May 2025 at 21:28, PG Bug reporting form
<noreply@postgresql.org> wrote:
> @@ -279,8 +279,7 @@ network_send(inet *addr, bool is_cidr)
>         pq_sendbyte(&buf, ip_bits(addr));
>         pq_sendbyte(&buf, is_cidr);
>         nb = ip_addrsize(addr);
> -       if (nb < 0)
> -               nb = 0;
> +       Assert(nb >= 0);


This has already been fixed in master by [1]. Since there's no actual
misbehaviour, there was no backpatch.

David

[1] https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=f27eb0325b7b2cff3b880fa669913693849521dc



pgsql-bugs by date:

Previous
From: PG Bug reporting form
Date:
Subject: BUG #18913: pgdg-redhat-repo-42.0-52PGDG.noarch: Cannot download, all mirrors were already tried without succes
Next
From: Daniel Gustafsson
Date:
Subject: Re: BUG #18914: REDUNDANT_COMPARISON.ALWAYS_FALSE Redundant comparison '0' > 'nb' (0 > {4, 16}) is always false