summaryrefslogtreecommitdiff
path: root/firmware/target/hosted/android/debug-android.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/target/hosted/android/debug-android.c')
-rw-r--r--firmware/target/hosted/android/debug-android.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/firmware/target/hosted/android/debug-android.c b/firmware/target/hosted/android/debug-android.c
index 6d77ac411b..d819bde3cb 100644
--- a/firmware/target/hosted/android/debug-android.c
+++ b/firmware/target/hosted/android/debug-android.c
@@ -26,6 +26,7 @@
26#include <android/log.h> 26#include <android/log.h>
27#include <stdarg.h> 27#include <stdarg.h>
28#include <stdio.h> 28#include <stdio.h>
29#include <string.h>
29 30
30#define LOG_TAG "Rockbox" 31#define LOG_TAG "Rockbox"
31 32
@@ -42,10 +43,10 @@ void debugf(const char *fmt, ...)
42void ldebugf(const char* file, int line, const char *fmt, ...) 43void ldebugf(const char* file, int line, const char *fmt, ...)
43{ 44{
44 va_list ap; 45 va_list ap;
45 char buf[1024]; 46 char buf[strlen(fmt) + 8];
46 snprintf(buf, sizeof(buf), "%s:%d %s", file, line, fmt); 47 snprintf(buf, sizeof(buf), "%s:%d %s", file, line, fmt);
47 va_start(ap, fmt); 48 va_start(ap, fmt);
48 __android_log_vprint(ANDROID_LOG_DEBUG, LOG_TAG " L", buf, ap); 49 __android_log_vprint(ANDROID_LOG_DEBUG, LOG_TAG, buf, ap);
49 va_end(ap); 50 va_end(ap);
50} 51}
51 52