From cc9e536dac7171fa62b73700a01495cc6b269560 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 21 May 2011 02:06:45 -0400 Subject: Fix handling of LC_CTYPE in locale name handling --- locale/setlocale.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'locale') 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; } -- cgit 1.4.1