diff options
author | Daniel Mack <daniel@zonque.org> | 2016-01-12 15:34:20 +0100 |
---|---|---|
committer | Daniel Mack <daniel@zonque.org> | 2016-01-12 15:36:32 +0100 |
commit | d054f0a4d451120c26494263fc4dc175bfd405b1 (patch) | |
tree | 43606871b8012973ac6f3936d4887a5c658ce097 /src/basic/log.c | |
parent | 1f52a79d4eb0216bf1f2d96539609f02d8bb9e71 (diff) |
tree-wide: use xsprintf() where applicable
Also add a coccinelle receipt to help with such transitions.
Diffstat (limited to 'src/basic/log.c')
-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 1a9e6bdb91..a2bc0d5be2 100644 --- a/src/basic/log.c +++ b/src/basic/log.c @@ -352,7 +352,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_SET_STRING(iovec[n++], location); } @@ -777,7 +777,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; |