1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-08-01 10:06:57 +03:00
This commit is contained in:
Jakub Jelinek
2007-07-12 18:26:36 +00:00
parent 7d58530341
commit 0ecb606cb6
6215 changed files with 494638 additions and 305010 deletions

View File

@ -1,5 +1,5 @@
/* Handle list of needed message catalogs
Copyright (C) 1995-1999, 2000, 2001, 2002, 2004
Copyright (C) 1995-1999, 2000, 2001, 2002, 2004, 2006
Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written by Ulrich Drepper <drepper@gnu.org>, 1995.
@ -110,7 +110,7 @@ _nl_find_domain (dirname, locale, domainname, domainbinding)
break;
}
return cnt >= 0 ? retval : NULL;
return retval;
/* NOTREACHED */
}
@ -119,20 +119,7 @@ _nl_find_domain (dirname, locale, domainname, domainbinding)
done. */
alias_value = _nl_expand_alias (locale);
if (alias_value != NULL)
{
#if defined _LIBC || defined HAVE_STRDUP
locale = strdup (alias_value);
if (locale == NULL)
return NULL;
#else
size_t len = strlen (alias_value) + 1;
locale = (char *) malloc (len);
if (locale == NULL)
return NULL;
memcpy (locale, alias_value, len);
#endif
}
locale = strdupa (alias_value);
/* Now we determine the single parts of the locale name. First
look for the language. Termination symbols are `_' and `@' if
@ -169,10 +156,6 @@ _nl_find_domain (dirname, locale, domainname, domainbinding)
}
}
/* The room for an alias was dynamically allocated. Free it now. */
if (alias_value != NULL)
free (locale);
/* The space for normalized_codeset is dynamically allocated. Free it. */
if (mask & XPG_NORM_CODESET)
free ((void *) normalized_codeset);