projects
/
collectd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
47ecc56
)
snmp plugin: initialize res sooner
author
Ruben Kerkhof
<ruben@rubenkerkhof.com>
Sat, 23 Apr 2016 09:10:25 +0000
(11:10 +0200)
committer
Ruben Kerkhof
<ruben@rubenkerkhof.com>
Sat, 23 Apr 2016 09:10:25 +0000
(11:10 +0200)
src/snmp.c
patch
|
blob
|
history
diff --git
a/src/snmp.c
b/src/snmp.c
index
31beee0
..
4f4be12
100644
(file)
--- a/
src/snmp.c
+++ b/
src/snmp.c
@@
-1673,7
+1673,7
@@
static int csnmp_read_table (host_definition_t *host, data_definition_t *data)
static int csnmp_read_value (host_definition_t *host, data_definition_t *data)
{
struct snmp_pdu *req;
- struct snmp_pdu *res;
+ struct snmp_pdu *res
= NULL
;
struct variable_list *vb;
const data_set_t *ds;
@@
-1735,7
+1735,6
@@
static int csnmp_read_value (host_definition_t *host, data_definition_t *data)
for (i = 0; i < data->values_len; i++)
snmp_add_null_var (req, data->values[i].oid, data->values[i].oid_len);
- res = NULL;
status = snmp_sess_synch_response (host->sess_handle, req, &res);
if ((status != STAT_SUCCESS) || (res == NULL))