diff options
author | Luke Shumaker <lukeshu@sbcglobal.net> | 2014-12-17 23:11:47 -0500 |
---|---|---|
committer | Luke Shumaker <lukeshu@sbcglobal.net> | 2014-12-17 23:11:47 -0500 |
commit | 051ee4061b1f605b4b95a868c8c4d84b5dfd09b8 (patch) | |
tree | 65bc83123aa3e3b74f93b2c049f87aa093a7d371 /nslcd/cfg.c | |
parent | c588513154f287bb5ce3766c39696a9c4a16f149 (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/cfg.c')
-rw-r--r-- | nslcd/cfg.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/nslcd/cfg.c b/nslcd/cfg.c index c9a691f..5b42272 100644 --- a/nslcd/cfg.c +++ b/nslcd/cfg.c @@ -447,8 +447,7 @@ static void cfg_read(const char *filename, struct nslcd_config *cfg) /* open config file */ if ((fp = fopen(filename, "r")) == NULL) { - log_log(LOG_ERR, "cannot open config file (%s): %s", - filename, strerror(errno)); + log_log(LOG_ERR, "cannot open config file (%s)", filename); exit(EXIT_FAILURE); } /* read file and parse lines */ |