diff options
Diffstat (limited to 'ospfd/ospf_snmp.c')
| -rw-r--r-- | ospfd/ospf_snmp.c | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/ospfd/ospf_snmp.c b/ospfd/ospf_snmp.c index bf37556863..9727c7039c 100644 --- a/ospfd/ospf_snmp.c +++ b/ospfd/ospf_snmp.c @@ -693,7 +693,7 @@ static uint8_t *ospfAreaEntry(struct variable *v, oid *name, size_t *length, == MATCH_FAILED) return NULL; - memset(&addr, 0, sizeof(struct in_addr)); + memset(&addr, 0, sizeof(addr)); area = ospfAreaLookup(v, name, length, &addr, exact); if (!area) @@ -821,7 +821,7 @@ static uint8_t *ospfStubAreaEntry(struct variable *v, oid *name, size_t *length, == MATCH_FAILED) return NULL; - memset(&addr, 0, sizeof(struct in_addr)); + memset(&addr, 0, sizeof(addr)); area = ospfStubAreaLookup(v, name, length, &addr, exact); if (!area) @@ -1044,10 +1044,10 @@ static uint8_t *ospfLsdbEntry(struct variable *v, oid *name, size_t *length, /* INDEX { ospfLsdbAreaId, ospfLsdbType, ospfLsdbLsid, ospfLsdbRouterId } */ - memset(&area_id, 0, sizeof(struct in_addr)); + memset(&area_id, 0, sizeof(area_id)); type = 0; - memset(&ls_id, 0, sizeof(struct in_addr)); - memset(&router_id, 0, sizeof(struct in_addr)); + memset(&ls_id, 0, sizeof(ls_id)); + memset(&router_id, 0, sizeof(router_id)); /* Check OSPF instance. */ ospf = ospf_lookup_by_vrf_id(VRF_DEFAULT); @@ -1279,7 +1279,7 @@ static uint8_t *ospfHostEntry(struct variable *v, oid *name, size_t *length, if (ospf == NULL) return NULL; - memset(&addr, 0, sizeof(struct in_addr)); + memset(&addr, 0, sizeof(addr)); nbr_nbma = ospfHostLookup(v, name, length, &addr, exact); if (nbr_nbma == NULL) @@ -1595,7 +1595,7 @@ static uint8_t *ospfIfEntry(struct variable *v, oid *name, size_t *length, return NULL; ifindex = 0; - memset(&ifaddr, 0, sizeof(struct in_addr)); + memset(&ifaddr, 0, sizeof(ifaddr)); /* Check OSPF instance. */ ospf = ospf_lookup_by_vrf_id(VRF_DEFAULT); @@ -1742,7 +1742,7 @@ static uint8_t *ospfIfMetricEntry(struct variable *v, oid *name, size_t *length, return NULL; ifindex = 0; - memset(&ifaddr, 0, sizeof(struct in_addr)); + memset(&ifaddr, 0, sizeof(ifaddr)); /* Check OSPF instance. */ ospf = ospf_lookup_by_vrf_id(VRF_DEFAULT); @@ -1778,7 +1778,7 @@ static int ospf_snmp_vl_add(struct ospf_vl_data *vl_data) struct prefix_ls lp; struct route_node *rn; - memset(&lp, 0, sizeof(struct prefix_ls)); + memset(&lp, 0, sizeof(lp)); lp.family = AF_UNSPEC; lp.prefixlen = 64; lp.id = vl_data->vl_area_id; @@ -1797,7 +1797,7 @@ static int ospf_snmp_vl_delete(struct ospf_vl_data *vl_data) struct prefix_ls lp; struct route_node *rn; - memset(&lp, 0, sizeof(struct prefix_ls)); + memset(&lp, 0, sizeof(lp)); lp.family = AF_UNSPEC; lp.prefixlen = 64; lp.id = vl_data->vl_area_id; @@ -1819,7 +1819,7 @@ static struct ospf_vl_data *ospf_snmp_vl_lookup(struct in_addr *area_id, struct route_node *rn; struct ospf_vl_data *vl_data; - memset(&lp, 0, sizeof(struct prefix_ls)); + memset(&lp, 0, sizeof(lp)); lp.family = AF_UNSPEC; lp.prefixlen = 64; lp.id = *area_id; @@ -1842,7 +1842,7 @@ static struct ospf_vl_data *ospf_snmp_vl_lookup_next(struct in_addr *area_id, struct route_node *rn; struct ospf_vl_data *vl_data; - memset(&lp, 0, sizeof(struct prefix_ls)); + memset(&lp, 0, sizeof(lp)); lp.family = AF_UNSPEC; lp.prefixlen = 64; lp.id = *area_id; @@ -1927,8 +1927,8 @@ static uint8_t *ospfVirtIfEntry(struct variable *v, oid *name, size_t *length, == MATCH_FAILED) return NULL; - memset(&area_id, 0, sizeof(struct in_addr)); - memset(&neighbor, 0, sizeof(struct in_addr)); + memset(&area_id, 0, sizeof(area_id)); + memset(&neighbor, 0, sizeof(neighbor)); vl_data = ospfVirtIfLookup(v, name, length, &area_id, &neighbor, exact); if (!vl_data) @@ -2139,7 +2139,7 @@ static uint8_t *ospfNbrEntry(struct variable *v, oid *name, size_t *length, == MATCH_FAILED) return NULL; - memset(&nbr_addr, 0, sizeof(struct in_addr)); + memset(&nbr_addr, 0, sizeof(nbr_addr)); ifindex = 0; nbr = ospfNbrLookup(v, name, length, &nbr_addr, &ifindex, exact); @@ -2190,8 +2190,8 @@ static uint8_t *ospfVirtNbrEntry(struct variable *v, oid *name, size_t *length, == MATCH_FAILED) return NULL; - memset(&area_id, 0, sizeof(struct in_addr)); - memset(&neighbor, 0, sizeof(struct in_addr)); + memset(&area_id, 0, sizeof(area_id)); + memset(&neighbor, 0, sizeof(neighbor)); /* Check OSPF instance. */ ospf = ospf_lookup_by_vrf_id(VRF_DEFAULT); @@ -2331,8 +2331,8 @@ static uint8_t *ospfExtLsdbEntry(struct variable *v, oid *name, size_t *length, return NULL; type = OSPF_AS_EXTERNAL_LSA; - memset(&ls_id, 0, sizeof(struct in_addr)); - memset(&router_id, 0, sizeof(struct in_addr)); + memset(&ls_id, 0, sizeof(ls_id)); + memset(&router_id, 0, sizeof(router_id)); /* Check OSPF instance. */ ospf = ospf_lookup_by_vrf_id(VRF_DEFAULT); |
