aboutsummaryrefslogtreecommitdiff
path: root/iconv/gconv_conf.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1999-04-28 21:56:46 +0000
committerUlrich Drepper <drepper@redhat.com>1999-04-28 21:56:46 +0000
commit390500b147a8063ea4be7313ec38cada26f9235a (patch)
treeedf14c04a0a46992ce4c04eeaf604fab99a9d960 /iconv/gconv_conf.c
parentfbb9cc9129ae3efdb1652b175f57956033102876 (diff)
downloadglibc-390500b147a8063ea4be7313ec38cada26f9235a.tar
glibc-390500b147a8063ea4be7313ec38cada26f9235a.tar.gz
glibc-390500b147a8063ea4be7313ec38cada26f9235a.tar.bz2
glibc-390500b147a8063ea4be7313ec38cada26f9235a.zip
Update.
1999-04-28 Ulrich Drepper <drepper@cygnus.com> * manager.c (pthread_allocate_stack): Optimize initialization of new thread descriptor.
Diffstat (limited to 'iconv/gconv_conf.c')
-rw-r--r--iconv/gconv_conf.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/iconv/gconv_conf.c b/iconv/gconv_conf.c
index a0aae43138..dce913da74 100644
--- a/iconv/gconv_conf.c
+++ b/iconv/gconv_conf.c
@@ -67,8 +67,7 @@ static struct gconv_module builtin_modules[] =
#undef BUILTIN_TRANSFORMATION
#undef BUILTIN_ALIAS
-static const char *
-builtin_aliases[] =
+static const char *builtin_aliases[] =
{
#define BUILTIN_TRANSFORMATION(From, ConstPfx, ConstLen, To, Cost, Name, \
Fct, Init, End, MinF, MaxF, MinT, MaxT)
@@ -201,14 +200,16 @@ add_alias (char *rp, void *modules)
malloc (sizeof (struct gconv_alias) + (wp - from));
if (new_alias != NULL)
{
+ void **inserted;
+
new_alias->fromname = memcpy ((char *) new_alias
+ sizeof (struct gconv_alias),
from, wp - from);
new_alias->toname = new_alias->fromname + (to - from);
- if (__tfind (new_alias, &__gconv_alias_db, __gconv_alias_compare) != NULL
- || (__tsearch (new_alias, &__gconv_alias_db, __gconv_alias_compare)
- == NULL))
+ inserted = (void **) __tsearch (new_alias, &__gconv_alias_db,
+ __gconv_alias_compare);
+ if (inserted == NULL || *inserted != (void **) new_alias)
/* Something went wrong, free this entry. */
free (new_alias);
}