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-4.4'
[collectd.git]
/
src
/
cpu.c
diff --git
a/src/cpu.c
b/src/cpu.c
index
7692e2b
..
7773dc4
100644
(file)
--- a/
src/cpu.c
+++ b/
src/cpu.c
@@
-182,12
+182,12
@@
static void submit (int cpu_num, const char *type_instance, counter_t value)
vl.time = time (NULL);
strcpy (vl.host, hostname_g);
strcpy (vl.plugin, "cpu");
vl.time = time (NULL);
strcpy (vl.host, hostname_g);
strcpy (vl.plugin, "cpu");
- snprintf (vl.plugin_instance, sizeof (vl.type_instance),
+ s
s
nprintf (vl.plugin_instance, sizeof (vl.type_instance),
"%i", cpu_num);
"%i", cpu_num);
-
vl.plugin_instance[DATA_MAX_NAME_LEN - 1] = '\0'
;
- s
trcpy (vl.type_instance, type_instance
);
+
strcpy (vl.type, "cpu")
;
+ s
strncpy (vl.type_instance, type_instance, sizeof (vl.type_instance)
);
- plugin_dispatch_values (
"cpu",
&vl);
+ plugin_dispatch_values (&vl);
}
static int cpu_read (void)
}
static int cpu_read (void)