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

Who writes this stuff?

libltdl/ltdl.c

index f3f8f2c..61ebe66 100644 (file)
@@ -2954,6 +2954,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
@@ -2984,6 +2985,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.  */