diff options
author | Christopher Faylor <me@cgf.cx> | 2003-02-01 05:00:15 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2003-02-01 05:00:15 +0000 |
commit | a5a93a62b2e1f8b13d20f72f0d1a6f5266c05c37 (patch) | |
tree | be908e1fae0c18104d6ba848a5ac22d4cde6fcfd /winsup/cygwin/dlfcn.cc | |
parent | b0a82a859dde5807c66ed4eee81f8788905ed43e (diff) | |
download | cygnal-a5a93a62b2e1f8b13d20f72f0d1a6f5266c05c37.tar.gz cygnal-a5a93a62b2e1f8b13d20f72f0d1a6f5266c05c37.tar.bz2 cygnal-a5a93a62b2e1f8b13d20f72f0d1a6f5266c05c37.zip |
* dlfcn.cc (dlerror): Only report load errors once per error.
Diffstat (limited to 'winsup/cygwin/dlfcn.cc')
-rw-r--r-- | winsup/cygwin/dlfcn.cc | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/winsup/cygwin/dlfcn.cc b/winsup/cygwin/dlfcn.cc index b6babe66b..b03f685fc 100644 --- a/winsup/cygwin/dlfcn.cc +++ b/winsup/cygwin/dlfcn.cc @@ -144,8 +144,13 @@ dlclose (void *handle) char * dlerror () { - char *ret = 0; - if (_dl_error) - ret = _dl_buffer; - return ret; + char *res; + if (!_dl_error) + res = NULL; + else + { + _dl_error = 0; + res = _dl_buffer; + } + return res; } |