projects
/
collectd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'collectd-5.5' into collectd-5.6
[collectd.git]
/
src
/
utils_cmd_getthreshold.c
diff --git
a/src/utils_cmd_getthreshold.c
b/src/utils_cmd_getthreshold.c
index
80babe3
..
b2a0a23
100644
(file)
--- a/
src/utils_cmd_getthreshold.c
+++ b/
src/utils_cmd_getthreshold.c
@@
-25,6
+25,7
@@
**/
#include "collectd.h"
**/
#include "collectd.h"
+
#include "common.h"
#include "plugin.h"
#include "common.h"
#include "plugin.h"
@@
-53,7
+54,6
@@
int handle_getthreshold (FILE *fh, char *buffer)
char *type;
char *type_instance;
char *type;
char *type_instance;
- value_list_t vl;
threshold_t threshold;
int status;
threshold_t threshold;
int status;
@@
-110,7
+110,9
@@
int handle_getthreshold (FILE *fh, char *buffer)
return (-1);
}
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.host, host, sizeof (vl.host));
sstrncpy (vl.plugin, plugin, sizeof (vl.plugin));
if (plugin_instance != NULL)
@@
-120,7
+122,6
@@
int handle_getthreshold (FILE *fh, char *buffer)
sstrncpy (vl.type_instance, type_instance, sizeof (vl.type_instance));
sfree (identifier_copy);
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)
{
status = ut_search_threshold (&vl, &threshold);
if (status == ENOENT)
{