syslog: avoid extra format
async_safe_format_log formats the arguments into a new buffers, then
calls async_safe_write_log. Since the string is already formatted, call
async_safe_write_log directly instead.
Test: boot device
Flag: EXEMPT .
Change-Id: Ice37e5225b3ea7c663940a7d771c0e3055639c58
diff --git a/libc/bionic/syslog.cpp b/libc/bionic/syslog.cpp
index a459c6b..e8107a7 100644
--- a/libc/bionic/syslog.cpp
+++ b/libc/bionic/syslog.cpp
@@ -83,7 +83,7 @@
int n = vsnprintf(log_line, sizeof(log_line), fmt, args);
if (n < 0) return;
- async_safe_format_log(android_log_priority, log_tag, "%s", log_line);
+ async_safe_write_log(android_log_priority, log_tag, log_line);
if ((syslog_options & LOG_PERROR) != 0) {
bool have_newline =
(n > 0 && n < static_cast<int>(sizeof(log_line)) && log_line[n - 1] == '\n');