aboutsummaryrefslogtreecommitdiffstats
path: root/plugin_i2c_sensors.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--plugin_i2c_sensors.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/plugin_i2c_sensors.c b/plugin_i2c_sensors.c
index 8f273cf..5d1c57f 100644
--- a/plugin_i2c_sensors.c
+++ b/plugin_i2c_sensors.c
@@ -113,7 +113,7 @@ static int parse_i2c_sensors_sysfs(const char *key)
fgets(buffer, sizeof(buffer), stream);
fclose(stream);
- if (!buffer) {
+ if (buffer[0] == '\0') {
error("i2c_sensors: %s empty ?!", file);
return -1;
}
@@ -183,7 +183,7 @@ static int parse_i2c_sensors_procfs(const char *key)
fgets(buffer, sizeof(buffer), stream);
fclose(stream);
- if (!buffer) {
+ if (buffer[0] == '\0') {
error("i2c_sensors: %s empty ?!", file);
return -1;
}