diff --git a/src/snmp.c b/src/snmp.c
index 7805944000d1f665feee222b62a47e5e361d0453..4f849320a3f3f6bdc2bdfb3730bf60fdc08016c5 100644 (file)
--- a/src/snmp.c
+++ b/src/snmp.c
*/
static void csnmp_oid_init (oid_t *dst, oid const *src, size_t n)
{
- assert (n <= STATIC_ARRAY_LEN (dst->oid));
+ assert (n <= STATIC_ARRAY_SIZE (dst->oid));
memcpy (dst->oid, src, sizeof (*src) * n);
dst->oid_len = n;
}
@@ -1204,7 +1204,6 @@ static int csnmp_read_table (host_definition_t *host, data_definition_t *data)
/* Holds the last OID returned by the device. We use this in the GETNEXT
* request to proceed. */
oid_t oid_list[oid_list_len];
- oid_t *oid_list;
/* Set to false when an OID has left its subtree so we don't re-request it
* again. */
_Bool oid_list_todo[oid_list_len];
@@ -1379,9 +1378,8 @@ static int csnmp_read_table (host_definition_t *host, data_definition_t *data)
/* Calculate the current suffix. This is later used to check that the
* suffix is increasing. This also checks if we left the subtree */
- int ret;
- ret = csnmp_oid_suffix (&suffix, &vb_name, data->values + i);
- if (ret != 0)
+ status = csnmp_oid_suffix (&suffix, &vb_name, data->values + i);
+ if (status != 0)
{
DEBUG ("snmp plugin: host = %s; data = %s; i = %i; "
"Value probably left its subtree.",
host = ud->data;
if (host->interval == 0)
- host->interval = interval_g;
+ host->interval = plugin_get_interval ();
time_start = cdtime ();