diff options
author | Tomas Bzatek <tbzatek@redhat.com> | 2014-01-09 15:15:53 +0100 |
---|---|---|
committer | Tomas Bzatek <tbzatek@redhat.com> | 2014-01-09 15:15:53 +0100 |
commit | d1660672c0ba88e75b27af85449a0d39abed8408 (patch) | |
tree | b17318153a396f0af5108bdc2343c9cbc5af46ed /src/fan | |
parent | bc16e11fb41146aee30f851bd41de9d645ad68bb (diff) | |
download | openlmi-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.c | 3 |
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); |