DEBUG(PLUGIN_NAME ": Type: %s", dd->type);
if (dd->type_instance)
DEBUG(PLUGIN_NAME ": TypeInstance: %s", dd->type_instance);
- for (int i = 0; i < dd->oids_len; i++) {
+ for (size_t i = 0; i < dd->oids_len; i++) {
snmp_agent_oid_to_string(oid_str, sizeof(oid_str), &dd->oids[i]);
DEBUG(PLUGIN_NAME ": OID[%d]: %s", i, oid_str);
}
DEBUG(PLUGIN_NAME ": Type: %s", dd->type);
if (dd->type_instance)
DEBUG(PLUGIN_NAME ": TypeInstance: %s", dd->type_instance);
- for (int i = 0; i < dd->oids_len; i++) {
+ for (size_t i = 0; i < dd->oids_len; i++) {
snmp_agent_oid_to_string(oid_str, sizeof(oid_str), &dd->oids[i]);
DEBUG(PLUGIN_NAME ": OID[%d]: %s", i, oid_str);
}
return 0;
}
-static void snmp_agent_generate_oid2string(oid_t *oid, int offset, char *key) {
+static void snmp_agent_generate_oid2string(oid_t *oid, size_t offset, char *key) {
int key_len = oid->oid[offset];
int i;
for (llentry_t *de = llist_head(td->columns); de != NULL; de = de->next) {
data_definition_t *dd = de->value;
- for (int i = 0; i < dd->oids_len; i++)
+ for (size_t i = 0; i < dd->oids_len; i++)
if (td->index_oid.oid_len)
snmp_agent_unregister_oid_index(&dd->oids[i], *index);
else
/* unregister scalar type OID */
if ((*dd)->table == NULL) {
- for (int i = 0; i < (*dd)->oids_len; i++)
+ for (size_t i = 0; i < (*dd)->oids_len; i++)
unregister_mib((*dd)->oids[i].oid, (*dd)->oids[i].oid_len);
}
if (!(*dd)->table->index_oid.oid_len) {
c_avl_iterator_t *iter = c_avl_get_iterator((*dd)->table->instance_index);
while (c_avl_iterator_next(iter, (void *)&instance, (void *)&instance) ==
0) {
- for (int i = 0; i < (*dd)->oids_len; i++)
+ for (size_t i = 0; i < (*dd)->oids_len; i++)
snmp_agent_unregister_oid_string(&(*dd)->oids[i], instance);
}
c_avl_iterator_destroy(iter);
c_avl_iterator_t *iter = c_avl_get_iterator((*dd)->table->index_instance);
while (c_avl_iterator_next(iter, (void *)&index, (void *)&value) == 0) {
- for (int i = 0; i < (*dd)->oids_len; i++)
+ for (size_t i = 0; i < (*dd)->oids_len; i++)
snmp_agent_unregister_oid_index(&(*dd)->oids[i], *index);
}
c_avl_iterator_destroy(iter);
}
assert(ds->ds_num == values_num);
- assert(oid_index < values_num);
+ assert(oid_index < (int)values_num);
char data[DATA_MAX_NAME_LEN];
size_t data_len = sizeof(data);
for (llentry_t *de = llist_head(td->columns); de != NULL; de = de->next) {
data_definition_t *dd = de->value;
- for (int i = 0; i < dd->oids_len; i++) {
+ for (size_t i = 0; i < dd->oids_len; i++) {
int ret = snmp_oid_ncompare(oid.oid, oid.oid_len, dd->oids[i].oid,
dd->oids[i].oid_len,
MIN(oid.oid_len, dd->oids[i].oid_len));
de = de->next) {
data_definition_t *dd = de->value;
- for (int i = 0; i < dd->oids_len; i++) {
+ for (size_t i = 0; i < dd->oids_len; i++) {
int ret = snmp_oid_compare(oid.oid, oid.oid_len, dd->oids[i].oid,
dd->oids[i].oid_len);
for (llentry_t *de = llist_head(td->columns); de != NULL; de = de->next) {
data_definition_t *dd = de->value;
- for (int i = 0; i < dd->oids_len; i++) {
+ for (size_t i = 0; i < dd->oids_len; i++) {
dd->oids[i].type =
snmp_agent_get_asn_type(dd->oids[i].oid, dd->oids[i].oid_len);
}
for (llentry_t *e = llist_head(g_agent->scalars); e != NULL; e = e->next) {
data_definition_t *dd = e->value;
- for (int i = 0; i < dd->oids_len; i++) {
+ for (size_t i = 0; i < dd->oids_len; i++) {
dd->oids[i].type =
snmp_agent_get_asn_type(dd->oids[i].oid, dd->oids[i].oid_len);
for (llentry_t *de = llist_head(td->columns); de != NULL; de = de->next) {
data_definition_t *dd = de->value;
- for (int i = 0; i < dd->oids_len; i++) {
+ for (size_t i = 0; i < dd->oids_len; i++) {
if (td->index_oid.oid_len) {
ret = snmp_agent_register_oid_index(&dd->oids[i], *index,
snmp_agent_table_oid_handler);