From 390500b147a8063ea4be7313ec38cada26f9235a Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 28 Apr 1999 21:56:46 +0000 Subject: Update. 1999-04-28 Ulrich Drepper * manager.c (pthread_allocate_stack): Optimize initialization of new thread descriptor. --- iconv/gconv_conf.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'iconv/gconv_conf.c') diff --git a/iconv/gconv_conf.c b/iconv/gconv_conf.c index a0aae43..dce913d 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); } -- cgit v1.1