projects
/
collectd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Replace all occurrences of `strcpy' with `sstrncpy'.
[collectd.git]
/
src
/
swap.c
diff --git
a/src/swap.c
b/src/swap.c
index
e91ebef
..
4d1f24d
100644
(file)
--- a/
src/swap.c
+++ b/
src/swap.c
@@
-124,8
+124,8
@@
static void swap_submit (const char *type_instance, double value)
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, "swap"
);
+ s
strncpy (vl.host, hostname_g, sizeof (vl.host)
);
+ s
strncpy (vl.plugin, "swap", sizeof (vl.plugin)
);
strncpy (vl.type_instance, type_instance, sizeof (vl.type_instance));
plugin_dispatch_values ("swap", &vl);
strncpy (vl.type_instance, type_instance, sizeof (vl.type_instance));
plugin_dispatch_values ("swap", &vl);