chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c9c5554
)
Replace use of snprintf with xsprintf
author
Daniel Lockyer
<thisisdaniellockyer@gmail.com>
Fri, 24 Nov 2017 10:36:04 +0000
(10:36 +0000)
committer
Sven Eden
<yamakuzure@gmx.net>
Fri, 24 Nov 2017 10:36:04 +0000
(10:36 +0000)
src/basic/log.c
patch
|
blob
|
history
diff --git
a/src/basic/log.c
b/src/basic/log.c
index 3367f8424b2c76b497925d61d155807422af0441..ce96ac443fa20098bf044f8c552606b6be8eb4c1 100644
(file)
--- 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;