summaryrefslogtreecommitdiffstats
path: root/framesequence
diff options
context:
space:
mode:
authorJohn Reck <jreck@google.com>2014-03-14 18:38:24 -0700
committerJohn Reck <jreck@google.com>2014-03-14 18:38:24 -0700
commitb5fb6d0f18fed511256fd3aa07bb3eccbbb15f80 (patch)
treeb52ae926f19306879e1bc852b2bffe97a84c417a /framesequence
parent6a005419e50275062d97711ce8402b5d71940c81 (diff)
downloadandroid_frameworks_ex-b5fb6d0f18fed511256fd3aa07bb3eccbbb15f80.tar.gz
android_frameworks_ex-b5fb6d0f18fed511256fd3aa07bb3eccbbb15f80.tar.bz2
android_frameworks_ex-b5fb6d0f18fed511256fd3aa07bb3eccbbb15f80.zip
Fix ALOG_ASSERT
Change-Id: I3484aa7b62ad883a94ef68ec2c65841716d85a2c
Diffstat (limited to 'framesequence')
-rw-r--r--framesequence/jni/utils/log.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/framesequence/jni/utils/log.h b/framesequence/jni/utils/log.h
index 5e15f30..d8441dc 100644
--- a/framesequence/jni/utils/log.h
+++ b/framesequence/jni/utils/log.h
@@ -267,6 +267,20 @@ extern "C" {
if (__android_log_assert(ANDROID_##priority, tag))
#endif
+/* Returns 2nd arg. Used to substitute default value if caller's vararg list
+ * is empty.
+ */
+#define __android_second(dummy, second, ...) second
+
+/* If passed multiple args, returns ',' followed by all but 1st arg, otherwise
+ * returns nothing.
+ */
+#define __android_rest(first, ...) , ## __VA_ARGS__
+
+#define android_printAssert(cond, tag, fmt...) \
+ __android_log_assert(cond, tag, \
+ __android_second(0, ## fmt, NULL) __android_rest(fmt))
+
#ifdef __cplusplus
}
#endif