summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick Gauvin <gauvin@hcs.ufl.edu>2016-06-26 12:47:28 -0400
committerChris Johns <chrisj@rtems.org>2018-02-08 14:21:13 +1100
commita346408e4e3e3f4e1163404b12fdf20bd321cde8 (patch)
tree60f05e45c4f837805a3b5f6e8e39af81889ce915
parenta2a9751823d506ccd9cd4264fd2e97032d306cb5 (diff)
downloadrtems-a346408e4e3e3f4e1163404b12fdf20bd321cde8.tar.bz2
libdl: dlerror return NULL when no error
Updates #2747
-rw-r--r--cpukit/libdl/dlfcn.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/cpukit/libdl/dlfcn.c b/cpukit/libdl/dlfcn.c
index 4277caf757..55ad97b753 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;
}