mirror of
https://sourceware.org/git/glibc.git
synced 2025-08-10 05:03:06 +03:00
(dcigettext): Fix interpretation of tsearch return value.
This commit is contained in:
@@ -607,7 +607,8 @@ DCIGETTEXT (domainname, msgid1, msgid2, plural, n, category)
|
|||||||
/* Insert the entry in the search tree. */
|
/* Insert the entry in the search tree. */
|
||||||
foundp = (struct known_translation_t **)
|
foundp = (struct known_translation_t **)
|
||||||
tsearch (newp, &root, transcmp);
|
tsearch (newp, &root, transcmp);
|
||||||
if (__builtin_expect (&newp != foundp, 0))
|
if (foundp == NULL
|
||||||
|
|| __builtin_expect (*foundp != newp, 0))
|
||||||
/* The insert failed. */
|
/* The insert failed. */
|
||||||
free (newp);
|
free (newp);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user