Replace use of snprintf with xsprintf

This commit is contained in:
Daniel Lockyer
2017-11-24 10:36:04 +00:00
parent f9ecfd3bbe
commit a7419dbc59
5 changed files with 7 additions and 7 deletions
+2 -2
View File
@@ -359,7 +359,7 @@ static int write_to_console(
highlight = LOG_PRI(level) <= LOG_ERR && show_color;
if (show_location) {
snprintf(location, sizeof(location), "(%s:%i) ", file, line);
xsprintf(location, "(%s:%i) ", file, line);
iovec[n++] = IOVEC_MAKE_STRING(location);
}
@@ -798,7 +798,7 @@ static void log_assert(
return;
DISABLE_WARNING_FORMAT_NONLITERAL;
snprintf(buffer, sizeof buffer, format, text, file, line, func);
xsprintf(buffer, format, text, file, line, func);
REENABLE_WARNING;
log_abort_msg = buffer;