]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
* libltdl/ltdl.c (lt_dlinit): removed unused variable, `loader'.
authorGary V. Vaughan <gary@gnu.org>
Mon, 21 Feb 2000 22:03:16 +0000 (22:03 +0000)
committerGary V. Vaughan <gary@gnu.org>
Mon, 21 Feb 2000 22:03:16 +0000 (22:03 +0000)
ChangeLog
libltdl/ltdl.c

index 6f934436544b00c22a062e79c220d8d91ee9f2f4..044296ddebb2bb03714b86d900c9878d22fff398 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2000-02-21  Gary V. Vaughan  <gary@oranda.demon.co.uk>
+
+       * libltdl/ltdl.c (lt_dlinit): removed unused variable, `loader'.
+
 2000-02-03  Gary V. Vaughan  <gary@oranda.demon.co.uk>
 
        * libltdl/ltdl.h (lt_dlloader_data_t):  New type for loader
index 7abf7b49422e9e5b496d983429a3a563798f36f0..4145e2a43c404ae5dc86697f38f61b1095843e2c 100644 (file)
@@ -914,16 +914,7 @@ tryall_dlopen (handle, filename)
        const char *saved_error = last_error;
        
        /* check whether the module was already opened */
-       cur = handles;
-       while (cur) {
-               /* try to dlopen the program itself? */
-               if (!cur->info.filename && !filename)
-                       break;
-               if (cur->info.filename && filename && 
-                   strcmp(cur->info.filename, filename) == 0)
-                       break;
-               cur = cur->next;
-       }
+       cur = lt_find_dlhandle (filename);
        if (cur) {
                cur->info.ref_count++;
                *handle = cur;
@@ -1603,6 +1594,26 @@ lt_dlopenext (filename)
        return 0;
 }
 
+lt_dlhandle
+lt_find_dlhandle (filename)
+       const char *filename;
+{
+       lt_dlhandle cur = handles;
+       
+       /* check whether the module was already opened */
+       while (cur) {
+               /* try to dlopen the program itself? */
+               if (!cur->info.filename && !filename)
+                       break;
+               if (cur->info.filename && filename && 
+                   strcmp(cur->info.filename, filename) == 0)
+                       break;
+               cur = cur->next;
+       }
+
+       return cur;
+}
+
 int
 lt_dlclose (handle)
        lt_dlhandle handle;