X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=src%2Fsnmp.c;h=ad81c89214a926d8e194bad96d2dd207bf6fa707;hb=HEAD;hp=045f09b13b41bd3a3eab2562e16d76618fefe72e;hpb=842c1a2d2a640151a89b9de7f4acd3b6a058c799;p=collectd.git diff --git a/src/snmp.c b/src/snmp.c index 045f09b1..ad81c892 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; } @@ -1373,12 +1373,12 @@ static int csnmp_read_table (host_definition_t *host, data_definition_t *data) csnmp_table_values_t *vt; oid_t vb_name; oid_t suffix; + int ret; csnmp_oid_init (&vb_name, vb->name, vb->name_length); /* 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) {