public inbox for [email protected]  
help / color / mirror / Atom feed
From: Bertrand Drouvot <[email protected]>
To: Peter Eisentraut <[email protected]>
Cc: Álvaro Herrera <[email protected]>
Cc: Michael Paquier <[email protected]>
Cc: Heikki Linnakangas <[email protected]>
Cc: Quan Zongliang <[email protected]>
Cc: [email protected]
Subject: Re: Consistently use the XLogRecPtrIsInvalid() macro
Date: Tue, 2 Dec 2025 14:35:48 +0000
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <aQ2O99S+VjEZSf3/@ip-10-97-1-34.eu-west-3.compute.internal>
	<[email protected]>
	<[email protected]>
	<aRw2/gV/[email protected]>
	<[email protected]>
	<[email protected]>
	<[email protected]>

Hi,

On Tue, Dec 02, 2025 at 08:44:28AM +0100, Peter Eisentraut wrote:
> On 01.12.25 08:14, Bertrand Drouvot wrote:
> > Hi,
> > 
> > On Tue, Nov 18, 2025 at 04:54:32PM +0100, Peter Eisentraut wrote:
> > > I mean, some people like writing if (!foo) and some like writing if
> > > (foo == NULL), but we're not going to legislate one
> > > over the other.
> > 
> > Agree. Out of curiosity, I searched for pointers and literal zero comparisons
> > or assignments (with [1]) and found 6 of them.
> > 
> > While literal zero is technically correct, NULL is the semantically appropriate
> > choice for pointers.
> > 
> > PFA a patch to fix those 6.
> 
> committed (required pgindent)

Thanks! 

Doh, I always run pgindent unless when I think the changes could not break the
indentation.

Note to self: always run pgindent, no thinking required ;-)

Regards,

-- 
Bertrand Drouvot
PostgreSQL Contributors Team
RDS Open Source Databases
Amazon Web Services: https://aws.amazon.com





view thread (47+ messages)

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]
  Subject: Re: Consistently use the XLogRecPtrIsInvalid() macro
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox