summaryrefslogtreecommitdiff
path: root/locale
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@gmail.com>2011-05-21 02:06:45 -0400
committerUlrich Drepper <drepper@gmail.com>2011-05-21 02:06:45 -0400
commitcc9e536dac7171fa62b73700a01495cc6b269560 (patch)
treef2f49028167d9a57703c40c8c23e994283ff6db2 /locale
parentaec84f53952315ac1bd91036e37113d9cb3a303b (diff)
downloadglibc-cc9e536dac7171fa62b73700a01495cc6b269560.tar.gz
Fix handling of LC_CTYPE in locale name handling
Diffstat (limited to 'locale')
-rw-r--r--locale/setlocale.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/locale/setlocale.c b/locale/setlocale.c
index 46372fdcac..94e1c6480a 100644
--- a/locale/setlocale.c
+++ b/locale/setlocale.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992, 1995-2000, 2002, 2003, 2004, 2006, 2008, 2010
+/* Copyright (C) 1991, 1992, 1995-2000, 2002, 2003, 2004, 2006, 2008, 2010, 2011
Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -155,7 +155,7 @@ new_composite_name (int category, const char *newnames[__LC_LAST])
_nl_global_locale.__names[i]);
last_len = strlen (name);
cumlen += _nl_category_name_sizes[i] + 1 + last_len + 1;
- if (i > 0 && same && strcmp (name, newnames[0]) != 0)
+ if (same && name != newnames[0] && strcmp (name, newnames[0]) != 0)
same = 0;
}