projects
/
collectd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[2475] write_prometheus plugin: Fix port listening
[collectd.git]
/
src
/
load.c
diff --git
a/src/load.c
b/src/load.c
index
585b1f9
..
c738860
100644
(file)
--- a/
src/load.c
+++ b/
src/load.c
@@
-72,8
+72,6
@@
static int load_config(const char *key, const char *value) {
return (-1);
}
static void load_submit(gauge_t snum, gauge_t mnum, gauge_t lnum) {
return (-1);
}
static void load_submit(gauge_t snum, gauge_t mnum, gauge_t lnum) {
- value_t values[3];
- value_list_t vl = VALUE_LIST_INIT;
int cores = 0;
char errbuf[1024];
int cores = 0;
char errbuf[1024];
@@
-91,14
+89,14
@@
static void load_submit(gauge_t snum, gauge_t mnum, gauge_t lnum) {
lnum /= cores;
}
lnum /= cores;
}
- values[0].gauge = snum;
- values[1].gauge = mnum;
- values[2].gauge = lnum;
+ value_list_t vl = VALUE_LIST_INIT;
+ value_t values[] = {
+ {.gauge = snum}, {.gauge = mnum}, {.gauge = lnum},
+ };
vl.values = values;
vl.values_len = STATIC_ARRAY_SIZE(values);
vl.values = values;
vl.values_len = STATIC_ARRAY_SIZE(values);
- sstrncpy(vl.host, hostname_g, sizeof(vl.host));
sstrncpy(vl.plugin, "load", sizeof(vl.plugin));
sstrncpy(vl.type, "load", sizeof(vl.type));
sstrncpy(vl.plugin, "load", sizeof(vl.plugin));
sstrncpy(vl.type, "load", sizeof(vl.type));