projects
/
collectd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
41234a4
)
examples/myplugin.c: Use sstrncpy instead of strcpy.
author
Sebastian Harl
<sh@tokkee.org>
Fri, 25 Jul 2008 14:17:18 +0000
(16:17 +0200)
committer
Florian Forster
<octo@huhu.verplant.org>
Sun, 27 Jul 2008 09:43:45 +0000
(11:43 +0200)
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
contrib/examples/myplugin.c
patch
|
blob
|
history
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);
- 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: "") */