diff options
Diffstat (limited to 'logd/tests/logd_test.cpp')
-rw-r--r-- | logd/tests/logd_test.cpp | 6 |
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; } |