diff options
author | Jakub Jelinek <jakub@redhat.com> | 2006-04-24 08:55:46 +0000 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2006-04-24 08:55:46 +0000 |
commit | d0145e03799e484f3a53d79de3b3f34162ee9d3c (patch) | |
tree | d8c51a0952204f9015de0db3319d4c820e8646e0 /intl | |
parent | f5ce81c94cc27035f44d37bffa7f7e08dbce7631 (diff) | |
download | glibc-d0145e03799e484f3a53d79de3b3f34162ee9d3c.tar.gz glibc-d0145e03799e484f3a53d79de3b3f34162ee9d3c.tar.xz glibc-d0145e03799e484f3a53d79de3b3f34162ee9d3c.zip |
Updated to fedora-glibc-20060424T0820
Diffstat (limited to 'intl')
-rw-r--r-- | intl/explodename.c | 4 | ||||
-rw-r--r-- | intl/finddomain.c | 23 |
2 files changed, 5 insertions, 22 deletions
diff --git a/intl/explodename.c b/intl/explodename.c index f7bcfa5ff6..8e326ead53 100644 --- a/intl/explodename.c +++ b/intl/explodename.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1995-2002, 2003 Free Software Foundation, Inc. +/* Copyright (C) 1995-2002, 2003, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995. @@ -78,7 +78,7 @@ _nl_explode_name (name, language, modifier, territory, codeset, if (*language == cp) /* This does not make sense: language has to be specified. Use this entry as it is without exploding. Perhaps it is an alias. */ - cp = strchr (*language, '\0'); + cp = __rawmemchr (*language, '\0'); else if (cp[0] != '@') { if (cp[0] == '_') diff --git a/intl/finddomain.c b/intl/finddomain.c index 39e54755d2..9806ba12cd 100644 --- a/intl/finddomain.c +++ b/intl/finddomain.c @@ -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); |