nl_langinfo: Simplify case ladder
authorJohn Marino <draco@marino.st>
Mon, 9 Nov 2015 22:22:11 +0000 (23:22 +0100)
committerJohn Marino <draco@marino.st>
Mon, 9 Nov 2015 22:22:11 +0000 (23:22 +0100)
The NONE:US-ASCII case isn't necessary.  The "NONE:" case will handle
US-ASCII, so let's remove the redundant handling.

lib/libc/locale/nl_langinfo.c

index 8728d0f..7711f67 100644 (file)
@@ -72,8 +72,6 @@ nl_langinfo_l(nl_item item, locale_t loc)
                        ret = "SJIS";
                else if (strcmp(s, "NONE") == 0)
                        ret = "POSIX";
-               else if (strcmp(s, "NONE:US-ASCII") == 0)
-                       ret = "US-ASCII";
                else if (strncmp(s, "NONE:", 5) == 0)
                        ret = (char *)(s + 5);
                else