index 80babe3ebdc4dc36d63656c5c346ea67e297cc97..e6086f27193226c631f9bb7e4a8358c0dde545e2 100644 (file)
**/
#include "collectd.h"
+
#include "common.h"
#include "plugin.h"
char *type;
char *type_instance;
- value_list_t vl;
threshold_t threshold;
int status;
status = parse_identifier (identifier_copy, &host,
&plugin, &plugin_instance,
- &type, &type_instance);
+ &type, &type_instance,
+ /* default_host = */ NULL);
if (status != 0)
{
DEBUG ("handle_getthreshold: Cannot parse identifier `%s'.", identifier);
return (-1);
}
- memset (&vl, 0, sizeof (vl));
+ value_list_t vl = {
+ .values = NULL
+ };
sstrncpy (vl.host, host, sizeof (vl.host));
sstrncpy (vl.plugin, plugin, sizeof (vl.plugin));
if (plugin_instance != NULL)
sstrncpy (vl.type_instance, type_instance, sizeof (vl.type_instance));
sfree (identifier_copy);
- memset (&threshold, 0, sizeof (threshold));
status = ut_search_threshold (&vl, &threshold);
if (status == ENOENT)
{