]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
polarssl: avoid extra newlines in debug messages
authorGisle Vanem <gvanem@yahoo.no>
Sat, 22 Mar 2014 15:52:48 +0000 (16:52 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Sat, 22 Mar 2014 15:55:39 +0000 (16:55 +0100)
The debug messages printed inside PolarSSL always seems to end with a
newline. So 'infof()' should not add one. Besides the trace 'line'
should be 'const'.

lib/vtls/polarssl.c

index e03135a5bcb968396574e97ad092b71c12da4bb0..705805ac72b1e11d8c41c830ff9859b38bb679d2 100644 (file)
@@ -104,7 +104,7 @@ static int entropy_func_mutex(void *data, unsigned char *output, size_t len)
 #undef POLARSSL_DEBUG
 
 #ifdef POLARSSL_DEBUG
-static void polarssl_debug(void *context, int level, char *line)
+static void polarssl_debug(void *context, int level, const char *line)
 {
   struct SessionHandle *data = NULL;
 
@@ -113,7 +113,8 @@ static void polarssl_debug(void *context, int level, char *line)
 
   data = (struct SessionHandle *)context;
 
-  infof(data, "%s\n", line);
+  infof(data, "%s", line);
+  (void) level;
 }
 #else
 #endif