From f5b6b735a731901f09d7f3cc153c1d869269ee83 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 15 Apr 2024 21:38:57 +0200 Subject: Adding upstream version 2.12.1. Signed-off-by: Daniel Baumann --- lib/encodings.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lib/encodings.c') diff --git a/lib/encodings.c b/lib/encodings.c index 68c06c6..dbec49d 100644 --- a/lib/encodings.c +++ b/lib/encodings.c @@ -748,9 +748,9 @@ const char * ATTRIBUTE_PURE get_output_encoding (const char *device) /* Return the value of LESSCHARSET appropriate for this locale. */ const char * ATTRIBUTE_PURE get_less_charset (const char *charset_from_locale) { - const struct less_charset_entry *entry; - if (charset_from_locale) { + const struct less_charset_entry *entry; + for (entry = less_charset_table; entry->charset_from_locale; ++entry) if (STREQ (entry->charset_from_locale, @@ -766,9 +766,9 @@ const char * ATTRIBUTE_PURE get_less_charset (const char *charset_from_locale) */ const char * ATTRIBUTE_PURE get_jless_charset (const char *charset_from_locale) { - const struct less_charset_entry *entry; - if (charset_from_locale) { + const struct less_charset_entry *entry; + for (entry = less_charset_table; entry->charset_from_locale; ++entry) if (STREQ (entry->charset_from_locale, -- cgit v1.2.3