logcat: build regression
printflike checks for NULL fmt at compile time, checks for
NULL at runtime are optimized out. Regression as a result
of commit 5976303aa6e55a9e81eadb35d50f458052e3fa24.
Change-Id: Ia4e7ee4b6cb2adf1e6609c70e79684855f76e6fc
diff --git a/logcat/logcat.cpp b/logcat/logcat.cpp
index 5db539f..2b19b93 100644
--- a/logcat/logcat.cpp
+++ b/logcat/logcat.cpp
@@ -342,12 +342,10 @@
static void logcat_panic(bool showHelp, const char *fmt, ...)
{
- if (fmt) {
- va_list args;
- va_start(args, fmt);
- vfprintf(stderr, fmt, args);
- va_end(args);
- }
+ va_list args;
+ va_start(args, fmt);
+ vfprintf(stderr, fmt, args);
+ va_end(args);
if (showHelp) {
show_help(getprogname());