mirror of
https://sourceware.org/git/glibc.git
synced 2024-12-23 03:10:05 +00:00
(dcigettext): Fix interpretation of tsearch return value.
This commit is contained in:
parent
aa5f4ad8ef
commit
d89d0afad4
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user