| From: | Peter Eisentraut <peter(at)eisentraut(dot)org> |
|---|---|
| To: | Bertrand Drouvot <bertranddrouvot(dot)pg(at)gmail(dot)com> |
| Cc: | Álvaro Herrera <alvherre(at)kurilemu(dot)de>, Michael Paquier <michael(at)paquier(dot)xyz>, Heikki Linnakangas <hlinnaka(at)iki(dot)fi>, Quan Zongliang <quanzongliang(at)yeah(dot)net>, pgsql-hackers(at)lists(dot)postgresql(dot)org |
| Subject: | Re: Consistently use the XLogRecPtrIsInvalid() macro |
| Date: | 2025-12-02 07:44:28 |
| Message-ID: | ac6006ac-7d7b-42d3-8688-91afdfd39467@eisentraut.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
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)
| From | Date | Subject | |
|---|---|---|---|
| Next Message | jian he | 2025-12-02 07:52:57 | Re: CAST(... ON DEFAULT) - WIP build on top of Error-Safe User Functions |
| Previous Message | Bertrand Drouvot | 2025-12-02 07:40:44 | Re: Remove useless pointer advance in StatsShmemInit() |