diff options
author | David Herrmann <dh.herrmann@gmail.com> | 2013-03-16 16:03:30 +0100 |
---|---|---|
committer | David Herrmann <dh.herrmann@gmail.com> | 2013-11-03 12:24:14 +0100 |
commit | 7e095d9db3674af91496838c0f3739dbf8ebc60a (patch) | |
tree | 16f727c97b54ca89ce6203dde721967f7d4549eb /src | |
parent | 37eae950f019903db2556e2c617d34aa69a34e7a (diff) |
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>
Diffstat (limited to 'src')
-rw-r--r-- | src/shl_log.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/shl_log.c b/src/shl_log.c index 5b726a4..5318710 100644 --- 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 { |