shl: log: don't use strerror()
strerror() is not re-entrant safe so we should use %m instead. Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
This commit is contained in:
1 parent
37eae950f0
commit
7e095d9db3
1 file changed
+2
-2
+2
-2
@@ -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 {
|
||||
|
||||
Reference in new issue
Block a user