#include "utils_cache.h"
#include "utils_threshold.h"
-#include <assert.h>
-
/*
* Threshold management
* ====================
int status = 0;
int old_size = c_avl_size (threshold_tree);
- threshold_t th;
-
if (threshold_tree == NULL)
{
- threshold_tree = c_avl_create ((void *) strcmp);
+ threshold_tree = c_avl_create ((int (*) (const void *, const void *)) strcmp);
if (threshold_tree == NULL)
{
ERROR ("ut_config: c_avl_create failed.");
}
}
- memset (&th, '\0', sizeof (th));
- th.warning_min = NAN;
- th.warning_max = NAN;
- th.failure_min = NAN;
- th.failure_max = NAN;
-
- th.hits = 0;
- th.hysteresis = 0;
- th.flags = UT_FLAG_INTERESTING; /* interesting by default */
+ threshold_t th = {
+ .warning_min = NAN,
+ .warning_max = NAN,
+ .failure_min = NAN,
+ .failure_max = NAN,
+ .flags = UT_FLAG_INTERESTING /* interesting by default */
+ };
for (i = 0; i < ci->children_num; i++)
{