summaryrefslogtreecommitdiffstats
path: root/include/media/stagefright/foundation/ADebug.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/media/stagefright/foundation/ADebug.h')
-rw-r--r--include/media/stagefright/foundation/ADebug.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/include/media/stagefright/foundation/ADebug.h b/include/media/stagefright/foundation/ADebug.h
index 69021d8..eb5e494 100644
--- a/include/media/stagefright/foundation/ADebug.h
+++ b/include/media/stagefright/foundation/ADebug.h
@@ -32,6 +32,7 @@ namespace android {
#define CHECK(condition) \
LOG_ALWAYS_FATAL_IF( \
!(condition), \
+ "%s", \
__FILE__ ":" LITERAL_TO_STRING(__LINE__) \
" CHECK(" #condition ") failed.")
@@ -58,10 +59,12 @@ MAKE_COMPARATOR(GT,>)
do { \
AString ___res = Compare_##suffix(x, y); \
if (!___res.empty()) { \
- LOG_ALWAYS_FATAL( \
- __FILE__ ":" LITERAL_TO_STRING(__LINE__) \
- " CHECK_" #suffix "( " #x "," #y ") failed: %s", \
- ___res.c_str()); \
+ AString ___full = \
+ __FILE__ ":" LITERAL_TO_STRING(__LINE__) \
+ " CHECK_" #suffix "( " #x "," #y ") failed: "; \
+ ___full.append(___res); \
+ \
+ LOG_ALWAYS_FATAL("%s", ___full.c_str()); \
} \
} while (false)