From 7de0b6c3069c5fbef7729b7a86e40b75dfb616fd Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Wed, 7 Aug 2024 22:24:39 +0200 Subject: [PATCH 1/2] Remove dead code After e9931bfb751, the locale argument of SB_lower_char() is never not NULL, so the branch that deals with NULL can be removed. --- src/backend/utils/adt/like.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/backend/utils/adt/like.c b/src/backend/utils/adt/like.c index 0ecc96d48e5..bb4d73fb22e 100644 --- a/src/backend/utils/adt/like.c +++ b/src/backend/utils/adt/like.c @@ -95,10 +95,8 @@ SB_lower_char(unsigned char c, pg_locale_t locale, bool locale_is_c) { if (locale_is_c) return pg_ascii_tolower(c); - else if (locale) - return tolower_l(c, locale->info.lt); else - return pg_tolower(c); + return tolower_l(c, locale->info.lt); } -- 2.46.0