summaryrefslogtreecommitdiff
path: root/nslcd/common.h
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2014-12-17 23:11:47 -0500
committerLuke Shumaker <lukeshu@sbcglobal.net>2014-12-17 23:11:47 -0500
commit051ee4061b1f605b4b95a868c8c4d84b5dfd09b8 (patch)
tree65bc83123aa3e3b74f93b2c049f87aa093a7d371 /nslcd/common.h
parentc588513154f287bb5ce3766c39696a9c4a16f149 (diff)
Have log_log automatically append strerror(errno)
Instead of having strerror used everywhere. I did this because strerror is NOT thread safe. This still isn't thread safe, but at least now it's all in one place, easy to fix.
Diffstat (limited to 'nslcd/common.h')
-rw-r--r--nslcd/common.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/nslcd/common.h b/nslcd/common.h
index ca543fb..0c6f3f0 100644
--- a/nslcd/common.h
+++ b/nslcd/common.h
@@ -48,15 +48,15 @@
#define ERROR_OUT_WRITEERROR(fp) \
do { \
if (errno == EPIPE) \
- log_log(LOG_DEBUG, "error writing to client: %s", strerror(errno)); \
+ log_log(LOG_DEBUG, "error writing to client"); \
else \
- log_log(LOG_WARNING, "error writing to client: %s", strerror(errno)); \
+ log_log(LOG_WARNING, "error writing to client"); \
return -1; \
} while(0)
#define ERROR_OUT_READERROR(fp) \
do { \
- log_log(LOG_WARNING, "error reading from client: %s", strerror(errno)); \
+ log_log(LOG_WARNING, "error reading from client"); \
return -1; \
} while(0)