summaryrefslogtreecommitdiffstats
path: root/ospfd/ospf_snmp.c
diff options
context:
space:
mode:
Diffstat (limited to 'ospfd/ospf_snmp.c')
-rw-r--r--ospfd/ospf_snmp.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/ospfd/ospf_snmp.c b/ospfd/ospf_snmp.c
index e6ce1f01..adac7680 100644
--- a/ospfd/ospf_snmp.c
+++ b/ospfd/ospf_snmp.c
@@ -1391,11 +1391,7 @@ struct ospf_snmp_if
struct ospf_snmp_if *
ospf_snmp_if_new ()
{
- struct ospf_snmp_if *osif;
-
- osif = XMALLOC (0, sizeof (struct ospf_snmp_if));
- memset (osif, 0, sizeof (struct ospf_snmp_if));
- return osif;
+ return XCALLOC (0, sizeof (struct ospf_snmp_if));
}
void
@@ -1563,6 +1559,7 @@ ospf_snmp_if_lookup_next (struct in_addr *ifaddr, unsigned int *ifindex,
{
/* Usual interface */
if (ifaddr->s_addr)
+ {
/* The interface must have valid AF_INET connected address */
/* it must have lager IPv4 address value than the lookup entry */
if ((ospf_snmp_is_if_have_addr(osif->ifp)) &&
@@ -1576,6 +1573,7 @@ ospf_snmp_if_lookup_next (struct in_addr *ifaddr, unsigned int *ifindex,
if (oi)
return oi;
}
+ }
/* Unnumbered interface */
else
/* The interface must NOT have valid AF_INET connected address */