Re: null iv parameter passed to combo_init() - Mailing list pgsql-hackers

From Tom Lane
Subject Re: null iv parameter passed to combo_init()
Date
Msg-id 1693542.1641747076@sss.pgh.pa.us
Whole thread Raw
In response to Re: null iv parameter passed to combo_init()  (Noah Misch <noah@leadboat.com>)
List pgsql-hackers
Noah Misch <noah@leadboat.com> writes:
> On Sun, Jan 09, 2022 at 04:37:32AM -0800, Zhihong Yu wrote:
>> On Sat, Jan 8, 2022 at 11:32 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
>>> FWIW, I liked the "ivlen > 0" formulation better.  They should be
>>> equivalent, because ivlen is unsigned, but it just seems like "> 0"
>>> is more natural.

> If I were considering the one code site in isolation, I'd pick "ivlen > 0".
> But of the four sites identified so far, three have signed length variables.

Oh, hmm.  Unless we want to start changing those to unsigned, I agree
a not-equal test is a safer convention.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Why is src/test/modules/committs/t/002_standby.pl flaky?
Next
From: Jeff Davis
Date:
Subject: Re: Non-superuser subscription owners