X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=src%2Fthreshold.c;h=a8900db76ce280aed62a1959f3d7ec84fcfda10c;hb=1b15b227585497f72ab0e42d96d79c0313323bd4;hp=8815a002efc260090ea9f96b8aadc2b8d5ce0148;hpb=a7eecf6018a684dcf8323d4a41a7e704a5d57f02;p=collectd.git diff --git a/src/threshold.c b/src/threshold.c index 8815a002..a8900db7 100644 --- a/src/threshold.c +++ b/src/threshold.c @@ -251,7 +251,6 @@ static int ut_config_type (const threshold_t *th_orig, oconfig_item_t *ci) for (i = 0; i < ci->children_num; i++) { oconfig_item_t *option = ci->children + i; - status = 0; if (strcasecmp ("Instance", option->key) == 0) status = ut_config_type_instance (&th, option); @@ -339,7 +338,6 @@ static int ut_config_plugin (const threshold_t *th_orig, oconfig_item_t *ci) for (i = 0; i < ci->children_num; i++) { oconfig_item_t *option = ci->children + i; - status = 0; if (strcasecmp ("Type", option->key) == 0) status = ut_config_type (&th, option); @@ -386,7 +384,6 @@ static int ut_config_host (const threshold_t *th_orig, oconfig_item_t *ci) for (i = 0; i < ci->children_num; i++) { oconfig_item_t *option = ci->children + i; - status = 0; if (strcasecmp ("Type", option->key) == 0) status = ut_config_type (&th, option); @@ -522,8 +519,6 @@ static int ut_report_state (const data_set_t *ds, ": All data sources are within range again. " "Current value of \"%s\" is %f.", ds->ds[ds_index].name, values[ds_index]); - buf += status; - bufsize -= status; } else { @@ -591,8 +586,6 @@ static int ut_report_state (const data_set_t *ds, (state == STATE_ERROR) ? "failure" : "warning", (values[ds_index] < min) ? min : max); } - buf += status; - bufsize -= status; } plugin_dispatch_notification (&n); @@ -906,7 +899,6 @@ int ut_config (oconfig_item_t *ci) for (i = 0; i < ci->children_num; i++) { oconfig_item_t *option = ci->children + i; - status = 0; if (strcasecmp ("Type", option->key) == 0) status = ut_config_type (&th, option);