projects
/
platform
/
upstream
/
kmscon.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
37eae95
)
shl: log: don't use strerror()
author
David Herrmann
<dh.herrmann@gmail.com>
Sat, 16 Mar 2013 15:03:30 +0000
(16:03 +0100)
committer
David Herrmann
<dh.herrmann@gmail.com>
Sun, 3 Nov 2013 11:24:14 +0000
(12:24 +0100)
strerror() is not re-entrant safe so we should use %m instead.
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
src/shl_log.c
patch
|
blob
|
history
diff --git
a/src/shl_log.c
b/src/shl_log.c
index
5b726a4
..
5318710
100644
(file)
--- a/
src/shl_log.c
+++ b/
src/shl_log.c
@@
-320,8
+320,8
@@
int log_set_file(const char *file)
if (file) {
f = fopen(file, "a");
if (!f) {
- log_err("cannot change log-file to %s (%d): %
s
",
- file, errno
, strerror(errno)
);
+ log_err("cannot change log-file to %s (%d): %
m
",
+ file, errno);
return -EFAULT;
}
} else {