X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fsnmp.c;h=4f849320a3f3f6bdc2bdfb3730bf60fdc08016c5;hb=2dc2d5d5a7b11115441ac3f4ace1c4bea83bb915;hp=38a24cd3b29c18ac632af562a61ce62d6cca48d6;hpb=32e0d9078b73eeb889b9a1e62be72ded48d33d7d;p=collectd.git diff --git a/src/snmp.c b/src/snmp.c index 38a24cd3..4f849320 100644 --- a/src/snmp.c +++ b/src/snmp.c @@ -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; } @@ -1378,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.", @@ -1590,7 +1589,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 ();