aboutsummaryrefslogtreecommitdiff
path: root/intl/dcigettext.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2000-05-07 19:32:30 +0000
committerUlrich Drepper <drepper@redhat.com>2000-05-07 19:32:30 +0000
commitd89d0afad4551a808b15510795f965aed147a834 (patch)
tree6ee42f86f81214d429731b80816b3ff135d06b86 /intl/dcigettext.c
parentaa5f4ad8ef03d28615e0460788e0c4e3a8373122 (diff)
downloadglibc-d89d0afad4551a808b15510795f965aed147a834.tar
glibc-d89d0afad4551a808b15510795f965aed147a834.tar.gz
glibc-d89d0afad4551a808b15510795f965aed147a834.tar.bz2
glibc-d89d0afad4551a808b15510795f965aed147a834.zip
(dcigettext): Fix interpretation of tsearch return value.
Diffstat (limited to 'intl/dcigettext.c')
-rw-r--r--intl/dcigettext.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/intl/dcigettext.c b/intl/dcigettext.c
index 75f17072a2..3c86b83f28 100644
--- a/intl/dcigettext.c
+++ b/intl/dcigettext.c
@@ -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);
}