From ec782f56b0c30ef493e8356b46e1131612f01d9f Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Tue, 2 Dec 2025 08:39:24 +0100 Subject: 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 Discussion: https://www.postgresql.org/message-id/aS1AYnZmuRZ8g%2B5G%40ip-10-97-1-34.eu-west-3.compute.internal --- src/backend/utils/adt/pg_locale.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/backend/utils/adt/pg_locale.c') 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); } -- cgit v1.2.3