summaryrefslogtreecommitdiffstats
path: root/src/fan
diff options
context:
space:
mode:
authorTomas Bzatek <tbzatek@redhat.com>2014-01-09 15:15:53 +0100
committerTomas Bzatek <tbzatek@redhat.com>2014-01-09 15:15:53 +0100
commitd1660672c0ba88e75b27af85449a0d39abed8408 (patch)
treeb17318153a396f0af5108bdc2343c9cbc5af46ed /src/fan
parentbc16e11fb41146aee30f851bd41de9d645ad68bb (diff)
downloadopenlmi-providers-d1660672c0ba88e75b27af85449a0d39abed8408.tar.gz
openlmi-providers-d1660672c0ba88e75b27af85449a0d39abed8408.tar.xz
openlmi-providers-d1660672c0ba88e75b27af85449a0d39abed8408.zip
Use re-entrant version of strerror() for thread safety
Diffstat (limited to 'src/fan')
-rw-r--r--src/fan/fan.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/fan/fan.c b/src/fan/fan.c
index 5e36cb0..8296d61 100644
--- a/src/fan/fan.c
+++ b/src/fan/fan.c
@@ -109,11 +109,12 @@ static cim_fan_error_t reload_config_file(char const * fp) {
* @return 0 on success */
FILE *config_file = NULL;
int err;
+ char errbuf[STRERROR_BUF_LEN];
if (fp) {
if (!(config_file = fopen(fp, "r"))) {
error("Cound not open config file \"%s\": %s\n",
- fp, strerror(errno));
+ fp, strerror_r(errno, errbuf, sizeof(errbuf)));
}
}
err = sensors_init(config_file);