projects
/
collectd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Many build fixes that turned up with GCC 4.6.
[collectd.git]
/
src
/
vmem.c
diff --git
a/src/vmem.c
b/src/vmem.c
index
e0f76e7
..
d32f1db
100644
(file)
--- a/
src/vmem.c
+++ b/
src/vmem.c
@@
-45,15
+45,15
@@
static void submit (const char *plugin_instance, const char *type,
vl.values = values;
vl.values_len = values_len;
vl.values = values;
vl.values_len = values_len;
- vl.time = time (NULL);
- strcpy (vl.host, hostname_g);
- strcpy (vl.plugin, "vmem");
+ sstrncpy (vl.host, hostname_g, sizeof (vl.host));
+ sstrncpy (vl.plugin, "vmem", sizeof (vl.plugin));
if (plugin_instance != NULL)
sstrncpy (vl.plugin_instance, plugin_instance, sizeof (vl.plugin_instance));
if (plugin_instance != NULL)
sstrncpy (vl.plugin_instance, plugin_instance, sizeof (vl.plugin_instance));
+ sstrncpy (vl.type, type, sizeof (vl.type));
if (type_instance != NULL)
sstrncpy (vl.type_instance, type_instance, sizeof (vl.type_instance));
if (type_instance != NULL)
sstrncpy (vl.type_instance, type_instance, sizeof (vl.type_instance));
- plugin_dispatch_values (
type,
&vl);
+ plugin_dispatch_values (&vl);
} /* void vmem_submit */
static void submit_two (const char *plugin_instance, const char *type,
} /* void vmem_submit */
static void submit_two (const char *plugin_instance, const char *type,
@@
-77,9
+77,7
@@
static int vmem_config (const char *key, const char *value)
{
if (strcasecmp ("Verbose", key) == 0)
{
{
if (strcasecmp ("Verbose", key) == 0)
{
- if ((strcasecmp ("true", value) == 0)
- || (strcasecmp ("yes", value) == 0)
- || (strcasecmp ("on", value) == 0))
+ if (IS_TRUE (value))
verbose_output = 1;
else
verbose_output = 0;
verbose_output = 1;
else
verbose_output = 0;