snmp: eliminiate mib_ram_array_node (it is not necessary: to the agent, the nodes may be const since the actual mib implementation knows the structures behind the nodes which do not have to be const)

This commit is contained in:
Dirk Ziegelmeier
2015-10-03 20:27:49 +02:00
committed by sg
parent 8891b277c6
commit 5cf4771397
3 changed files with 19 additions and 33 deletions

View File

@@ -458,7 +458,7 @@ snmp_search_tree(const struct mib_node *node, u8_t ident_len, s32_t *ident, stru
while (node != NULL)
{
node_type = node->node_type;
if ((node_type == MIB_NODE_AR) || (node_type == MIB_NODE_RA))
if (node_type == MIB_NODE_AR)
{
const struct mib_array_node *an;
u16_t i;
@@ -652,7 +652,7 @@ empty_table(const struct mib_node *node)
empty = 1;
}
}
else if ((node_type == MIB_NODE_AR) || (node_type == MIB_NODE_RA))
else if (node_type == MIB_NODE_AR)
{
const struct mib_array_node *an;
an = (const struct mib_array_node*)(const void*)node;
@@ -689,7 +689,7 @@ snmp_expand_tree(const struct mib_node *node, u8_t ident_len, s32_t *ident, stru
{
climb_tree = 0;
node_type = node->node_type;
if ((node_type == MIB_NODE_AR) || (node_type == MIB_NODE_RA))
if (node_type == MIB_NODE_AR)
{
const struct mib_array_node *an;
u16_t i;