projects
/
collectd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
contrib/php-collection: Add a PHP frontend for graph generation.
[collectd.git]
/
src
/
netlink.c
diff --git
a/src/netlink.c
b/src/netlink.c
index
22afdc7
..
d6288e9
100644
(file)
--- a/
src/netlink.c
+++ b/
src/netlink.c
@@
-171,8
+171,8
@@
static void submit_one (const char *dev, const char *type,
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, "netlink"
);
+ s
strncpy (vl.host, hostname_g, sizeof (vl.host)
);
+ s
strncpy (vl.plugin, "netlink", sizeof (vl.plugin)
);
strncpy (vl.plugin_instance, dev, sizeof (vl.plugin_instance));
if (type_instance != NULL)
strncpy (vl.plugin_instance, dev, sizeof (vl.plugin_instance));
if (type_instance != NULL)
@@
-194,8
+194,8
@@
static void submit_two (const char *dev, const char *type,
vl.values = values;
vl.values_len = 2;
vl.time = time (NULL);
vl.values = values;
vl.values_len = 2;
vl.time = time (NULL);
- s
trcpy (vl.host, hostname_g
);
- s
trcpy (vl.plugin, "netlink"
);
+ s
strncpy (vl.host, hostname_g, sizeof (vl.host)
);
+ s
strncpy (vl.plugin, "netlink", sizeof (vl.plugin)
);
strncpy (vl.plugin_instance, dev, sizeof (vl.plugin_instance));
if (type_instance != NULL)
strncpy (vl.plugin_instance, dev, sizeof (vl.plugin_instance));
if (type_instance != NULL)
@@
-362,7
+362,7
@@
static int qos_filter (const struct sockaddr_nl *sa,
if (msg->tcm_ifindex >= iflist_len)
{
ERROR ("netlink plugin: qos_filter: msg->tcm_ifindex = %i "
if (msg->tcm_ifindex >= iflist_len)
{
ERROR ("netlink plugin: qos_filter: msg->tcm_ifindex = %i "
- ">= iflist_len = %
i
",
+ ">= iflist_len = %
zu
",
msg->tcm_ifindex, iflist_len);
return (-1);
}
msg->tcm_ifindex, iflist_len);
return (-1);
}