From 0c58d2ef46a4131ee3bdb6580a7d730e3b8000d0 Mon Sep 17 00:00:00 2001 From: Michael Starzinger Date: Wed, 28 Oct 2009 12:00:41 +0100 Subject: [PATCH] * src/native/native.cpp: Fixed bogus log_print calls. Please don't use strings that are dynamically generated as format strings, this is dangerous. --- src/native/native.cpp | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/src/native/native.cpp b/src/native/native.cpp index e5e2c7c62..551521836 100644 --- a/src/native/native.cpp +++ b/src/native/native.cpp @@ -504,12 +504,8 @@ void* NativeLibrary::open() if (opt_verbosejni) printf("failed ]\n"); - if (opt_verbose) { - log_start(); - log_print("NativeLibrary::open: os::dlopen failed: "); - log_print(os::dlerror()); - log_finish(); - } + if (opt_PrintWarnings) + log_println("NativeLibrary::open: os::dlopen failed: %s", os::dlerror()); return NULL; } @@ -544,12 +540,8 @@ void NativeLibrary::close() if (opt_verbosejni) printf("failed ]\n"); - if (opt_verbose) { - log_start(); - log_print("NativeLibrary::close: os::dlclose failed: "); - log_print(os::dlerror()); - log_finish(); - } + if (opt_PrintWarnings) + log_println("NativeLibrary::close: os::dlclose failed: %s", os::dlerror()); } if (opt_verbosejni) -- 2.25.1