projects
/
collectd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
uuid plugin: only look in /sys on Linux
[collectd.git]
/
src
/
snmp.c
diff --git
a/src/snmp.c
b/src/snmp.c
index
6a5bb8b
..
60bec83
100644
(file)
--- a/
src/snmp.c
+++ b/
src/snmp.c
@@
-25,6
+25,7
@@
**/
#include "collectd.h"
**/
#include "collectd.h"
+
#include "common.h"
#include "plugin.h"
#include "utils_complain.h"
#include "common.h"
#include "plugin.h"
#include "utils_complain.h"
@@
-641,7
+642,7
@@
static int csnmp_config_add_host (oconfig_item_t *ci)
/* Registration stuff. */
char cb_name[DATA_MAX_NAME_LEN];
/* Registration stuff. */
char cb_name[DATA_MAX_NAME_LEN];
- user_data_t cb_data;
+ user_data_t cb_data
= { 0 }
;
hd = calloc (1, sizeof (*hd));
if (hd == NULL)
hd = calloc (1, sizeof (*hd));
if (hd == NULL)
@@
-772,7
+773,6
@@
static int csnmp_config_add_host (oconfig_item_t *ci)
ssnprintf (cb_name, sizeof (cb_name), "snmp-%s", hd->name);
ssnprintf (cb_name, sizeof (cb_name), "snmp-%s", hd->name);
- memset (&cb_data, 0, sizeof (cb_data));
cb_data.data = hd;
cb_data.free_func = csnmp_host_definition_destroy;
cb_data.data = hd;
cb_data.free_func = csnmp_host_definition_destroy;
@@
-942,9
+942,8
@@
static value_t csnmp_value_list_to_value (struct variable_list *vl, int type,
}
else
{
}
else
{
- char oid_buffer[1024];
+ char oid_buffer[1024]
= { 0 }
;
- memset (oid_buffer, 0, sizeof (oid_buffer));
snprint_objid (oid_buffer, sizeof (oid_buffer) - 1,
vl->name, vl->name_length);
snprint_objid (oid_buffer, sizeof (oid_buffer) - 1,
vl->name, vl->name_length);
@@
-1276,7
+1275,6
@@
static int csnmp_dispatch_table (host_definition_t *host, data_definition_t *dat
vl.interval = host->interval;
have_more = 1;
vl.interval = host->interval;
have_more = 1;
- memset (¤t_suffix, 0, sizeof (current_suffix));
while (have_more)
{
_Bool suffix_skipped = 0;
while (have_more)
{
_Bool suffix_skipped = 0;