(dcigettext): Fix interpretation of tsearch return value.
authorUlrich Drepper <drepper@redhat.com>
Sun, 7 May 2000 19:32:30 +0000 (19:32 +0000)
committerUlrich Drepper <drepper@redhat.com>
Sun, 7 May 2000 19:32:30 +0000 (19:32 +0000)
intl/dcigettext.c

index 75f1707..3c86b83 100644 (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);
                    }