Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2007-07-10 05:21:03 +0400
committerChristopher Faylor <me@cgf.cx>2007-07-10 05:21:03 +0400
commitbe1cabba238ce5af7a11a852d9d528aa2f102c42 (patch)
tree4514435a77e144839602bba4ad8a9d8f7e4afaa7 /winsup/cygwin/dlfcn.cc
parent99b08560990feec1f9584861b7345d90c0c5881a (diff)
* debug.cc (close_handle): Change debug output format slightly.
* dlfcn.cc (dlclose): Don't close handle returned from GetModuleHandle(NULL). * fhandler.h (fhandler_pipe::create): Remove obsolete argument. (fhandler_pipe::create): Ditto. * fhandler.cc (fhandler_pipe::create): Ditto. (fhandler_pipe::create): Ditto.
Diffstat (limited to 'winsup/cygwin/dlfcn.cc')
-rw-r--r--winsup/cygwin/dlfcn.cc4
1 files changed, 1 insertions, 3 deletions
diff --git a/winsup/cygwin/dlfcn.cc b/winsup/cygwin/dlfcn.cc
index 5bea77419..3893045b3 100644
--- a/winsup/cygwin/dlfcn.cc
+++ b/winsup/cygwin/dlfcn.cc
@@ -145,12 +145,10 @@ int
dlclose (void *handle)
{
int ret = -1;
- void *temphandle = (void *) GetModuleHandle (NULL);
- if (temphandle == handle || FreeLibrary ((HMODULE) handle))
+ if (handle == GetModuleHandle (NULL) || FreeLibrary ((HMODULE) handle))
ret = 0;
if (ret)
set_dl_error ("dlclose");
- CloseHandle ((HMODULE) temphandle);
return ret;
}