Index: libltdl/ltdl.c
===================================================================
RCS file: /cvs/kaffe/kaffe/libltdl/ltdl.c,v
retrieving revision 1.32
diff -w -u -p -r1.32 ltdl.c
--- libltdl/ltdl.c	2 Dec 2002 14:35:53 -0000	1.32
+++ libltdl/ltdl.c	20 Dec 2002 16:23:52 -0000
@@ -2987,7 +2987,7 @@ lt_dlopenext (filename)
      failed, it is better to return an error message here than to
      report FILE_NOT_FOUND when the alternatives (foo.so etc) are not
      in the module search path.  */
-  if (handle || ((errors > 0) && file_not_found ()))
+  if (handle || ((errors > 0) && !file_not_found ()))
     {
       LT_DLFREE (tmp);
       return handle;
@@ -3014,7 +3014,7 @@ lt_dlopenext (filename)
 
   /* As before, if the file was found but loading failed, return now
      with the current error message.  */
-  if (handle || ((errors > 0) && file_not_found ()))
+  if (handle || ((errors > 0) && !file_not_found ()))
     {
       LT_DLFREE (tmp);
       return handle;
