From 7e095d9db3674af91496838c0f3739dbf8ebc60a Mon Sep 17 00:00:00 2001 From: David Herrmann Date: Sat, 16 Mar 2013 16:03:30 +0100 Subject: [PATCH] shl: log: don't use strerror() strerror() is not re-entrant safe so we should use %m instead. Signed-off-by: David Herrmann --- src/shl_log.c | 4 ++-- 1 file 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 {