X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fdf.c;h=e3aa45362e3103f294fc6652dabdd344c02240ff;hb=07ba05937aeaedd683656c3912040950dbf4a152;hp=e1d5b5139161b8f5996b7175df6a218b0ec4d41d;hpb=77ca1a45bab2f6adf9301723d0db68e5813a6d98;p=collectd.git diff --git a/src/df.c b/src/df.c index e1d5b513..e3aa4536 100644 --- a/src/df.c +++ b/src/df.c @@ -51,14 +51,14 @@ static const char *config_keys[] = { "ReportByDevice", "ReportInodes", "ValuesAbsolute", "ValuesPercentage"}; static int config_keys_num = STATIC_ARRAY_SIZE(config_keys); -static ignorelist_t *il_device = NULL; -static ignorelist_t *il_mountpoint = NULL; -static ignorelist_t *il_fstype = NULL; +static ignorelist_t *il_device; +static ignorelist_t *il_mountpoint; +static ignorelist_t *il_fstype; -static _Bool by_device = 0; -static _Bool report_inodes = 0; -static _Bool values_absolute = 1; -static _Bool values_percentage = 0; +static bool by_device; +static bool report_inodes; +static bool values_absolute = true; +static bool values_percentage; static int df_init(void) { if (il_device == NULL) @@ -99,28 +99,28 @@ static int df_config(const char *key, const char *value) { return 0; } else if (strcasecmp(key, "ReportByDevice") == 0) { if (IS_TRUE(value)) - by_device = 1; + by_device = true; return 0; } else if (strcasecmp(key, "ReportInodes") == 0) { if (IS_TRUE(value)) - report_inodes = 1; + report_inodes = true; else - report_inodes = 0; + report_inodes = false; return 0; } else if (strcasecmp(key, "ValuesAbsolute") == 0) { if (IS_TRUE(value)) - values_absolute = 1; + values_absolute = true; else - values_absolute = 0; + values_absolute = false; return 0; } else if (strcasecmp(key, "ValuesPercentage") == 0) { if (IS_TRUE(value)) - values_percentage = 1; + values_percentage = true; else - values_percentage = 0; + values_percentage = false; return 0; }