Remove dead code
authorPeter Eisentraut <[email protected]>
Mon, 12 Aug 2024 06:43:47 +0000 (08:43 +0200)
committerPeter Eisentraut <[email protected]>
Mon, 12 Aug 2024 06:52:30 +0000 (08:52 +0200)
After e9931bfb751, the locale argument of SB_lower_char() is never
NULL, so the branch that deals with NULL can be removed (similar to
how e9931bfb751 for example removed those branches in str_tolower()).

Reviewed-by: Jeff Davis <[email protected]>
Discussion: https://www.postgresql.org/message-id/4f562d84-87f4-44dc-8946-01d6c437936f@eisentraut.org

src/backend/utils/adt/like.c

index 0ecc96d48e540008d45bfb1f5ed155832badd5fa..bb4d73fb22e74fbca6a2b51264ba557ac31ad7ef 100644 (file)
@@ -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);
 }