summaryrefslogtreecommitdiff
path: root/src/backend/utils/adt/pg_locale.c
diff options
context:
space:
mode:
authorPeter Eisentraut <peter@eisentraut.org>2025-12-02 08:39:24 +0100
committerPeter Eisentraut <peter@eisentraut.org>2025-12-02 08:39:24 +0100
commitec782f56b0c30ef493e8356b46e1131612f01d9f (patch)
treefaf0c5226db71ec50e79978135f493d853882b76 /src/backend/utils/adt/pg_locale.c
parent376c649634bb3fbfad79940f996e2fcb4c2ea6bf (diff)
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
Diffstat (limited to 'src/backend/utils/adt/pg_locale.c')
-rw-r--r--src/backend/utils/adt/pg_locale.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/backend/utils/adt/pg_locale.c b/src/backend/utils/adt/pg_locale.c
index b02e7fa4f18..b26257c0a8d 100644
--- a/src/backend/utils/adt/pg_locale.c
+++ b/src/backend/utils/adt/pg_locale.c
@@ -1222,10 +1222,10 @@ pg_newlocale_from_collation(Oid collid)
* Make sure cache entry is marked invalid, in case we fail before
* setting things.
*/
- cache_entry->locale = 0;
+ cache_entry->locale = NULL;
}
- if (cache_entry->locale == 0)
+ if (cache_entry->locale == NULL)
{
cache_entry->locale = create_pg_locale(collid, CollationCacheContext);
}