X-Git-Url: https://git.octo.it/?p=collectd.git;a=blobdiff_plain;f=src%2Fthermal.c;h=959fec64e9a389c77af1e05a5aad0056c201a198;hp=cbd168b41bad622c09e86dd803eb8f52d17a1ca5;hb=6e41c3b1f024d7944e5e8010a87933555c662474;hpb=029b489b237a8785c539f85d4840a49ba6743603 diff --git a/src/thermal.c b/src/thermal.c index cbd168b4..959fec64 100644 --- a/src/thermal.c +++ b/src/thermal.c @@ -59,7 +59,7 @@ static int thermal_sysfs_device_read(const char __attribute__((unused)) * dir, const char *name, void __attribute__((unused)) * user_data) { char filename[PATH_MAX]; - bool success = 0; + bool success = false; value_t value; if (device_list && ignorelist_match(device_list, name)) @@ -69,13 +69,13 @@ static int thermal_sysfs_device_read(const char __attribute__((unused)) * dir, if (parse_value_file(filename, &value, DS_TYPE_GAUGE) == 0) { value.gauge /= 1000.0; thermal_submit(name, TEMP, value); - success = 1; + success = true; } snprintf(filename, sizeof(filename), "%s/%s/cur_state", dirname_sysfs, name); if (parse_value_file(filename, &value, DS_TYPE_GAUGE) == 0) { thermal_submit(name, COOLING_DEV, value); - success = 1; + success = true; } return success ? 0 : -1; @@ -157,9 +157,9 @@ static int thermal_config(const char *key, const char *value) { if (IS_TRUE(value)) ignorelist_set_invert(device_list, 0); } else if (strcasecmp(key, "ForceUseProcfs") == 0) { - force_procfs = 0; + force_procfs = false; if (IS_TRUE(value)) - force_procfs = 1; + force_procfs = true; } else { return -1; }