Merge branch 'collectd-5.2'
[collectd.git] / src / snmp.c
index 7805944..cff38a4 100644 (file)
@@ -108,7 +108,7 @@ static int csnmp_read_host (user_data_t *ud);
  */
 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];
@@ -1591,7 +1590,7 @@ static int csnmp_read_host (user_data_t *ud)
   host = ud->data;
 
   if (host->interval == 0)
-    host->interval = interval_g;
+    host->interval = plugin_get_interval ();
 
   time_start = cdtime ();