Replace pointer comparisons and assignments to literal zero with NULL
Peter Eisentraut <peter@eisentraut.org>
Author:
Peter Eisentraut <peter@eisentraut.org>
Date: 2025-12-02T07:39:24Z
Releases:
19 (unreleased)
Replace pointer comparisons and assignments to literal zero with NULL While 0 is technically correct, NULL is the semantically appropriate choice for pointers. Author: Bertrand Drouvot <bertranddrouvot.pg@gmail.com> Discussion: https://www.postgresql.org/message-id/aS1AYnZmuRZ8g%2B5G%40ip-10-97-1-34.eu-west-3.compute.internal
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/nodes/copyfuncs.c | modified | +1 −1 |
| src/backend/postmaster/postmaster.c | modified | +1 −1 |
| src/backend/utils/adt/pg_locale.c | modified | +2 −2 |
| src/backend/utils/adt/timestamp.c | modified | +1 −1 |
| src/interfaces/ecpg/ecpglib/prepare.c | modified | +1 −1 |
Discussion
- Consistently use the XLogRecPtrIsInvalid() macro 49 messages · 2025-10-28 → 2026-01-30