From: Gary V. Vaughan Date: Mon, 21 Feb 2000 22:03:16 +0000 (+0000) Subject: * libltdl/ltdl.c (lt_dlinit): removed unused variable, `loader'. X-Git-Tag: release-1-3d~198 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=7b0532e64225fc977d838b49dd0641e6d60a1b04;p=thirdparty%2Flibtool.git * libltdl/ltdl.c (lt_dlinit): removed unused variable, `loader'. --- diff --git a/ChangeLog b/ChangeLog index 6f9344365..044296dde 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2000-02-21 Gary V. Vaughan + + * libltdl/ltdl.c (lt_dlinit): removed unused variable, `loader'. + 2000-02-03 Gary V. Vaughan * libltdl/ltdl.h (lt_dlloader_data_t): New type for loader diff --git a/libltdl/ltdl.c b/libltdl/ltdl.c index 7abf7b494..4145e2a43 100644 --- a/libltdl/ltdl.c +++ b/libltdl/ltdl.c @@ -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;