diff options
| author | Donatas Abraitis <donatas.abraitis@gmail.com> | 2020-04-08 08:57:15 +0300 |
|---|---|---|
| committer | Donatas Abraitis <donatas.abraitis@gmail.com> | 2020-04-08 17:15:06 +0300 |
| commit | c4efd0f4235d1151a95add06ad5ccb42c7dcff21 (patch) | |
| tree | 9aaff71f3b3ae6c23457092f6c78a25deec6adb7 /ospf6d | |
| parent | c446af503e10e6b976500af81aa159512430d0d6 (diff) | |
*: Do not cast to the same type
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
Diffstat (limited to 'ospf6d')
| -rw-r--r-- | ospf6d/ospf6_asbr.c | 4 | ||||
| -rw-r--r-- | ospf6d/ospf6_lsa.c | 4 | ||||
| -rw-r--r-- | ospf6d/ospf6_spf.c | 6 | ||||
| -rw-r--r-- | ospf6d/ospf6_zebra.c | 4 |
4 files changed, 9 insertions, 9 deletions
diff --git a/ospf6d/ospf6_asbr.c b/ospf6d/ospf6_asbr.c index e059bfbc55..6e71a21bd5 100644 --- a/ospf6d/ospf6_asbr.c +++ b/ospf6d/ospf6_asbr.c @@ -918,8 +918,8 @@ void ospf6_asbr_distribute_list_update(int type) ZROUTE_NAME(type)); ospf6->t_distribute_update = NULL; - thread_add_timer_msec(master, ospf6_asbr_routemap_update_timer, - (void **)args, OSPF_MIN_LS_INTERVAL, + thread_add_timer_msec(master, ospf6_asbr_routemap_update_timer, args, + OSPF_MIN_LS_INTERVAL, &ospf6->t_distribute_update); } diff --git a/ospf6d/ospf6_lsa.c b/ospf6d/ospf6_lsa.c index c63ea47f29..bcfd975879 100644 --- a/ospf6d/ospf6_lsa.c +++ b/ospf6d/ospf6_lsa.c @@ -527,7 +527,7 @@ struct ospf6_lsa *ospf6_lsa_create(struct ospf6_lsa_header *header) /* allocate memory */ lsa = XCALLOC(MTYPE_OSPF6_LSA, sizeof(struct ospf6_lsa)); - lsa->header = (struct ospf6_lsa_header *)new_header; + lsa->header = new_header; /* dump string */ ospf6_lsa_printbuf(lsa, lsa->name, sizeof(lsa->name)); @@ -554,7 +554,7 @@ struct ospf6_lsa *ospf6_lsa_create_headeronly(struct ospf6_lsa_header *header) /* allocate memory */ lsa = XCALLOC(MTYPE_OSPF6_LSA, sizeof(struct ospf6_lsa)); - lsa->header = (struct ospf6_lsa_header *)new_header; + lsa->header = new_header; SET_FLAG(lsa->flag, OSPF6_LSA_HEADERONLY); /* dump string */ diff --git a/ospf6d/ospf6_spf.c b/ospf6d/ospf6_spf.c index b0fe890d33..80bff5795f 100644 --- a/ospf6d/ospf6_spf.c +++ b/ospf6d/ospf6_spf.c @@ -989,7 +989,7 @@ struct ospf6_lsa *ospf6_create_single_router_lsa(struct ospf6_area *area, rtr_lsa = ospf6_lsdb_next(end, rtr_lsa); continue; } - lsa_header = (struct ospf6_lsa_header *)rtr_lsa->header; + lsa_header = rtr_lsa->header; total_lsa_length += (ntohs(lsa_header->length) - lsa_length); num_lsa++; rtr_lsa = ospf6_lsdb_next(end, rtr_lsa); @@ -1027,7 +1027,7 @@ struct ospf6_lsa *ospf6_create_single_router_lsa(struct ospf6_area *area, assert(rtr_lsa); if (!OSPF6_LSA_IS_MAXAGE(rtr_lsa)) { /* Append first Link State ID LSA */ - lsa_header = (struct ospf6_lsa_header *)rtr_lsa->header; + lsa_header = rtr_lsa->header; memcpy(new_header, lsa_header, ntohs(lsa_header->length)); /* Assign new lsa length as aggregated length. */ ((struct ospf6_lsa_header *)new_header)->length = @@ -1057,7 +1057,7 @@ struct ospf6_lsa *ospf6_create_single_router_lsa(struct ospf6_area *area, } /* Append Next Link State ID LSA */ - lsa_header = (struct ospf6_lsa_header *)rtr_lsa->header; + lsa_header = rtr_lsa->header; memcpy(new_header, (OSPF6_LSA_HEADER_END(rtr_lsa->header) + 4), (ntohs(lsa_header->length) - lsa_length)); new_header += (ntohs(lsa_header->length) - lsa_length); diff --git a/ospf6d/ospf6_zebra.c b/ospf6d/ospf6_zebra.c index f8df37094f..2773a666a3 100644 --- a/ospf6d/ospf6_zebra.c +++ b/ospf6d/ospf6_zebra.c @@ -171,8 +171,8 @@ static int ospf6_zebra_read_route(ZAPI_CALLBACK_ARGS) if (IS_OSPF6_DEBUG_ZEBRA(RECV)) { char prefixstr[PREFIX2STR_BUFFER], nexthopstr[128]; - prefix2str((struct prefix *)&api.prefix, prefixstr, - sizeof(prefixstr)); + + prefix2str(&api.prefix, prefixstr, sizeof(prefixstr)); inet_ntop(AF_INET6, nexthop, nexthopstr, sizeof(nexthopstr)); zlog_debug( |
