From: Steinar H. Gunderson Date: Mon, 15 Apr 2013 22:41:04 +0000 (+0200) Subject: Correct use of strerror_r(); we always need to use the return value. X-Git-Tag: 1.0.0~102^2 X-Git-Url: https://git.sesse.net/?p=cubemap;a=commitdiff_plain;h=5ad72898a682d78330f206c0aa1b8f73f0baf122;ds=sidebyside Correct use of strerror_r(); we always need to use the return value. --- diff --git a/log.cpp b/log.cpp index a4f9236..c594988 100644 --- a/log.cpp +++ b/log.cpp @@ -116,6 +116,5 @@ void log(LogLevel log_level, const char *fmt, ...) void log_perror(const char *msg) { char errbuf[4096]; - strerror_r(errno, errbuf, sizeof(errbuf)); - log(ERROR, "%s: %s", msg, errbuf); + log(ERROR, "%s: %s", msg, strerror_r(errno, errbuf, sizeof(errbuf))); }