projects
/
collectd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
network plugin: Cast data sources to their respective types.
[collectd.git]
/
contrib
/
examples
/
myplugin.c
diff --git
a/contrib/examples/myplugin.c
b/contrib/examples/myplugin.c
index
240c6c3
..
f68cc1a
100644
(file)
--- a/
contrib/examples/myplugin.c
+++ b/
contrib/examples/myplugin.c
@@
-98,8
+98,8
@@
static int my_read (void)
vl.values = values;
vl.values_len = 1;
vl.time = time (NULL);
vl.values = values;
vl.values_len = 1;
vl.time = time (NULL);
- s
trcpy (vl.host, hostname_g
);
- s
trcpy (vl.plugin, "myplugin"
);
+ s
strncpy (vl.host, hostname_g, sizeof (vl.host)
);
+ s
strncpy (vl.plugin, "myplugin", sizeof (vl.plugin)
);
/* optionally set vl.plugin_instance and vl.type_instance to reasonable
* values (default: "") */
/* optionally set vl.plugin_instance and vl.type_instance to reasonable
* values (default: "") */