SYN SYN
[p5sagit/p5-mst-13.2.git] / ext / DynaLoader / dl_dlopen.xs
index 8020e23..350b0d5 100644 (file)
@@ -198,9 +198,10 @@ int
 dl_unload_file(libref)
     void *     libref
   CODE:
-    DLDEBUG(1,PerlIO_printf(Perl_debug_log, "dl_unload_file(%lx):\n", libref));
-    if ((RETVAL = dlclose(libref) == 0 ? 1 : 0) == 0);
-        SaveError("%s", dlerror()) ;
+    DLDEBUG(1,PerlIO_printf(Perl_debug_log, "dl_unload_file(%lx):\n", PTR2ul(libref)));
+    RETVAL = (dlclose(libref) == 0 ? 1 : 0);
+    if (!RETVAL)
+        SaveError(aTHX_ "%s", dlerror()) ;
     DLDEBUG(2,PerlIO_printf(Perl_debug_log, " retval = %d\n", RETVAL));
   OUTPUT:
     RETVAL