summaryrefslogtreecommitdiffstats
path: root/logd/tests/logd_test.cpp
diff options
context:
space:
mode:
authorChih-Hung Hsieh <chh@google.com>2014-09-12 16:02:28 -0700
committerMark Salyzyn <salyzyn@google.com>2014-09-12 23:37:42 +0000
commit634118e261d2a3c6f67212f43a4ec3f075d705b6 (patch)
treeb28d7d60199cd2b20272a30c51fddec49d0bc5de /logd/tests/logd_test.cpp
parentf41ee3d5a1f236b0770d1ebd7068606aea7288bd (diff)
downloadsystem_core-634118e261d2a3c6f67212f43a4ec3f075d705b6.zip
system_core-634118e261d2a3c6f67212f43a4ec3f075d705b6.tar.gz
system_core-634118e261d2a3c6f67212f43a4ec3f075d705b6.tar.bz2
logd: fix format-extra-args warning.
Bug: 17409250 Change-Id: Id50ebb57754b12d69ed605d0e2901b8e05c607c6
Diffstat (limited to 'logd/tests/logd_test.cpp')
-rw-r--r--logd/tests/logd_test.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/logd/tests/logd_test.cpp b/logd/tests/logd_test.cpp
index 4bea4be..96877a9 100644
--- a/logd/tests/logd_test.cpp
+++ b/logd/tests/logd_test.cpp
@@ -417,7 +417,11 @@ static void dump_log_msg(const char *prefix,
if (((p - cp) > 3) && !*p && ((unsigned int)(p - cp) < len)) {
fprintf(stderr, "\"");
while (*cp) {
- fprintf(stderr, (*cp != '\n') ? "%c" : "\\n", *cp);
+ if (*cp != '\n') {
+ fprintf(stderr, "%c", *cp);
+ } else {
+ fprintf(stderr, "\\n");
+ }
++cp;
--len;
}