summaryrefslogtreecommitdiffstats
path: root/lib/encodings.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 19:38:57 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 19:38:57 +0000
commitf5b6b735a731901f09d7f3cc153c1d869269ee83 (patch)
tree565a1b0f3c6a4094a5f2198879fb239053549f1e /lib/encodings.c
parentAdding upstream version 2.12.0. (diff)
downloadman-db-upstream/2.12.1.tar.xz
man-db-upstream/2.12.1.zip
Adding upstream version 2.12.1.upstream/2.12.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--lib/encodings.c8
1 files changed, 4 insertions, 4 deletions
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,