Cleanup some code

This commit is contained in:
topjohnwu
2023-05-28 23:50:52 -07:00
parent e668dbf6f7
commit f2846694e1
5 changed files with 43 additions and 25 deletions

View File

@@ -15,7 +15,7 @@ static int fmt_and_log_with_rs(LogLevel level, const char *fmt, va_list ap) {
buf[0] = '\0';
// Fortify logs when a fatal error occurs. Do not run through fortify again
int len = std::min(__call_bypassing_fortify(vsnprintf)(buf, sz, fmt, ap), sz - 1);
log_with_rs(level, rust::Slice(reinterpret_cast<const uint8_t *>(buf), len));
log_with_rs(level, u8_slice(buf, sz));
return len;
}