Get rid of annoying "return invalid handle if we failed to load
authoraland <aland>
Thu, 27 Apr 2006 18:39:32 +0000 (18:39 +0000)
committeraland <aland>
Thu, 27 Apr 2006 18:39:32 +0000 (18:39 +0000)
the module" crap.

Who writes this stuff?

libltdl/ltdl.c

index cd99acc..9f37f7a 100644 (file)
@@ -3477,6 +3477,7 @@ lt_dlopenext (filename)
   strcpy (tmp, filename);
   strcat (tmp, archive_ext);
   errors = try_dlopen (&handle, tmp);
+  if (errors) return 0;
 
   /* If we found FILENAME, stop searching -- whether we were able to
      load the file as a module or not.  If the file exists but loading
@@ -3507,6 +3508,7 @@ lt_dlopenext (filename)
 
   strcat(tmp, shlib_ext);
   errors = try_dlopen (&handle, tmp);
+  if (errors) return 0;
 
   /* As before, if the file was found but loading failed, return now
      with the current error message.  */