diff options
author | Daniel Lockyer <thisisdaniellockyer@gmail.com> | 2017-11-24 10:36:04 +0000 |
---|---|---|
committer | Sven Eden <yamakuzure@gmx.net> | 2017-11-24 10:36:04 +0000 |
commit | 6f8ee40d684e4c02211a80c3fa8a8a1e694693af (patch) | |
tree | f7614025b06acb3028bb89a4b9b1e2f8c186ef73 /src | |
parent | c9c55544e20de9ed65a2292e634bd340e68675e4 (diff) |
Replace use of snprintf with xsprintf
Diffstat (limited to 'src')
-rw-r--r-- | src/basic/log.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/basic/log.c b/src/basic/log.c index 3367f8424..ce96ac443 100644 --- a/src/basic/log.c +++ b/src/basic/log.c @@ -370,7 +370,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); } @@ -813,7 +813,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; |