From 9c80353aba66c68aedb92964d67457be45461807 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Kochma=C5=84ski?= Date: Mon, 9 Jan 2017 18:13:05 +0100 Subject: [PATCH] dlerror may return NULL, use safe variant --- src/c/ffi/libraries.d | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/c/ffi/libraries.d b/src/c/ffi/libraries.d index b95bcf9b2..51d22695d 100644 --- a/src/c/ffi/libraries.d +++ b/src/c/ffi/libraries.d @@ -147,10 +147,7 @@ set_library_error(cl_object block) { cl_object output; ecl_disable_interrupts(); #ifdef HAVE_DLFCN_H - { - const char * const error = dlerror (); - output = error == NULL ? ECL_NIL : make_base_string_copy(error); - } + output = ecl_cstring_to_base_string_or_nil(dlerror()); #endif #ifdef HAVE_MACH_O_DYLD_H {