X-Git-Url: https://git.octo.it/?p=collectd.git;a=blobdiff_plain;f=src%2Fwrite_sensu.c;h=99885a62f77825d1c7afbf3598565bbac10d47b3;hp=04f5aa78287c106a563848c210dfecab2307ad0c;hb=6e41c3b1f024d7944e5e8010a87933555c662474;hpb=029b489b237a8785c539f85d4840a49ba6743603 diff --git a/src/write_sensu.c b/src/write_sensu.c index 04f5aa78..99885a62 100644 --- a/src/write_sensu.c +++ b/src/write_sensu.c @@ -1019,10 +1019,10 @@ static int sensu_config_node(oconfig_item_t *ci) /* {{{ */ host->reference_count = 1; host->node = NULL; host->service = NULL; - host->notifications = 0; - host->metrics = 0; - host->store_rates = 1; - host->always_append_ds = 0; + host->notifications = false; + host->metrics = false; + host->store_rates = true; + host->always_append_ds = false; host->metric_handlers.nb_strs = 0; host->metric_handlers.strs = NULL; host->notification_handlers.nb_strs = 0; @@ -1124,16 +1124,17 @@ static int sensu_config_node(oconfig_item_t *ci) /* {{{ */ return -1; } - if ((host->notification_handlers.nb_strs > 0) && (host->notifications == 0)) { + if ((host->notification_handlers.nb_strs > 0) && + (host->notifications == false)) { WARNING("write_sensu plugin: NotificationHandler given so forcing " "notifications to be enabled"); host->notifications = 1; } - if ((host->metric_handlers.nb_strs > 0) && (host->metrics == 0)) { + if ((host->metric_handlers.nb_strs > 0) && (host->metrics == false)) { WARNING("write_sensu plugin: MetricHandler given so forcing metrics to be " "enabled"); - host->metrics = 1; + host->metrics = true; } if (!(host->notifications || host->metrics)) {