(dcigettext): Fix interpretation of tsearch return value.

This commit is contained in:
Ulrich Drepper 2000-05-07 19:32:30 +00:00
parent aa5f4ad8ef
commit d89d0afad4

View File

@ -607,7 +607,8 @@ DCIGETTEXT (domainname, msgid1, msgid2, plural, n, category)
/* Insert the entry in the search tree. */
foundp = (struct known_translation_t **)
tsearch (newp, &root, transcmp);
if (__builtin_expect (&newp != foundp, 0))
if (foundp == NULL
|| __builtin_expect (*foundp != newp, 0))
/* The insert failed. */
free (newp);
}