[rtems commit] libdl: dlerror return NULL when no error

Chris Johns chrisj at rtems.org
Thu Feb 8 22:32:33 UTC 2018


Module:    rtems
Branch:    4.11
Commit:    a346408e4e3e3f4e1163404b12fdf20bd321cde8
Changeset: http://git.rtems.org/rtems/commit/?id=a346408e4e3e3f4e1163404b12fdf20bd321cde8

Author:    Patrick Gauvin <gauvin at hcs.ufl.edu>
Date:      Sun Jun 26 12:47:28 2016 -0400

libdl: dlerror return NULL when no error

Updates #2747

---

 cpukit/libdl/dlfcn.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/cpukit/libdl/dlfcn.c b/cpukit/libdl/dlfcn.c
index 4277caf..55ad97b 100644
--- a/cpukit/libdl/dlfcn.c
+++ b/cpukit/libdl/dlfcn.c
@@ -132,6 +132,8 @@ dlerror (void)
   static char msg[64];
   rtems_rtl_get_error (msg, sizeof (msg));
   rtems_rtl_clear_error ();
+  if (msg[0] == '\0')
+    return NULL;
   return msg;
 }
 



More information about the vc mailing list