OSDN Git Service

* dlfcn.cc (dlerror): Only report load errors once per error.
authorcgf <cgf>
Sat, 1 Feb 2003 05:00:15 +0000 (05:00 +0000)
committercgf <cgf>
Sat, 1 Feb 2003 05:00:15 +0000 (05:00 +0000)
winsup/cygwin/ChangeLog
winsup/cygwin/dlfcn.cc

index 9f1527a..80e8c9f 100644 (file)
@@ -1,5 +1,9 @@
 2003-01-31  Christopher Faylor  <cgf@redhat.com>
 
+       * dlfcn.cc (dlerror): Only report load errors once per error.
+
+2003-01-31  Christopher Faylor  <cgf@redhat.com>
+
        * fhandler_serial.cc (fhandler_serial::open): Avoid extraneous setting
        of res.
 
index b6babe6..b03f685 100644 (file)
@@ -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;
 }