summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 3ec8f4d)
raw | patch | inline | side by side (parent: 3ec8f4d)
author | Florian Forster <octo@collectd.org> | |
Tue, 8 Dec 2015 10:46:09 +0000 (11:46 +0100) | ||
committer | Florian Forster <octo@collectd.org> | |
Tue, 8 Dec 2015 10:46:20 +0000 (11:46 +0100) |
CID: 37937
Signed-off-by: Florian Forster <octo@collectd.org>
Signed-off-by: Florian Forster <octo@collectd.org>
src/collectd-tg.c | patch | blob | history |
diff --git a/src/collectd-tg.c b/src/collectd-tg.c
index 9fec340214f4505cf96d9ab0d69fa3b1a800a81a..9857f92ede5ce0023eee3d263c0a6790b6ed5f15 100644 (file)
--- a/src/collectd-tg.c
+++ b/src/collectd-tg.c
strncpy (vl->identifier.type,
(vl->values_types[0] == LCC_TYPE_GAUGE) ? "gauge" : "derive",
sizeof (vl->identifier.type));
+ vl->identifier.type[sizeof (vl->identifier.type) - 1] = 0;
snprintf (vl->identifier.type_instance, sizeof (vl->identifier.type_instance),
"ti%li", random ());