Avoid formatting debug message uselessly
diff --git a/library/debug.c b/library/debug.c
index 753fc0f..d23e87b 100644
--- a/library/debug.c
+++ b/library/debug.c
@@ -55,7 +55,7 @@
#define DEBUG_BUF_SIZE 512
static int debug_log_mode = POLARSSL_DEBUG_DFL_MODE;
-static int debug_threshold = 0;
+int debug_threshold = 0;
void debug_set_log_mode( int log_mode )
{
@@ -73,7 +73,7 @@
char *str = polarssl_malloc( DEBUG_BUF_SIZE );
if( str == NULL )
- return;
+ return( NULL );
va_start( argp, format );
vsnprintf( str, DEBUG_BUF_SIZE - 1, format, argp );