*/
if (is_evpn_prefix_ipaddr_none(evp)) {
/* VNI MAC -> Global */
- evpn_type2_prefix_global_copy(
- (struct prefix_evpn *)&tmp_p, evp,
- NULL /* mac */,
- evpn_type2_path_info_get_ip(pi));
+ evpn_type2_prefix_global_copy(&tmp_p, evp,
+ NULL /* mac */,
+ evpn_type2_path_info_get_ip(
+ pi));
} else {
/* VNI IP -> Global */
- evpn_type2_prefix_global_copy(
- (struct prefix_evpn *)&tmp_p, evp,
- evpn_type2_path_info_get_mac(pi),
- NULL /* ip */);
+ evpn_type2_prefix_global_copy(&tmp_p, evp,
+ evpn_type2_path_info_get_mac(
+ pi),
+ NULL /* ip */);
}
route_vty_out_detail(vty, bgp, dest, (struct prefix *)&tmp_p,
/* IS-IS System-ID */
if (json)
json_object_string_addf(json_data, "neighborId",
- "%pSY\n",
- (uint8_t *)pnt);
+ "%pSY\n", pnt);
else
- vty_out(vty, "%pSY\n", (uint8_t *)pnt);
+ vty_out(vty, "%pSY\n", pnt);
pnt += 6;
}
}
memset(_a_at(at), 0, esize * count);
}
- return (void *)a;
+ return a;
#undef _a_at
}
if (!*p2)
return 1;
- x1 = strtol(p1, (char **)&tmp1, 10);
- x2 = strtol(p2, (char **)&tmp2, 10);
+ x1 = strtol(p1, &tmp1, 10);
+ x2 = strtol(p2, &tmp2, 10);
/* let's compare numbers now */
if (x1 < x2)
struct ls_vertex *ls_msg2vertex(struct ls_ted *ted, struct ls_message *msg,
bool delete)
{
- struct ls_node *node = (struct ls_node *)msg->data.node;
+ struct ls_node *node = msg->data.node;
struct ls_vertex *vertex = NULL;
switch (msg->event) {
struct ls_edge *ls_msg2edge(struct ls_ted *ted, struct ls_message *msg,
bool delete)
{
- struct ls_attributes *attr = (struct ls_attributes *)msg->data.attr;
+ struct ls_attributes *attr = msg->data.attr;
struct ls_edge *edge = NULL;
switch (msg->event) {
struct ls_subnet *ls_msg2subnet(struct ls_ted *ted, struct ls_message *msg,
bool delete)
{
- struct ls_prefix *pref = (struct ls_prefix *)msg->data.prefix;
+ struct ls_prefix *pref = msg->data.prefix;
struct ls_subnet *subnet = NULL;
switch (msg->event) {
uint16_t length = 0;
int sum = 0;
- lsah = (struct ospf6_lsa_header *)lsa->header;
+ lsah = lsa->header;
if (ntohs(lsah->length) <= OSPF6_LSA_HEADER_SIZE) {
if (IS_DEBUG_OSPF6_GR)
zlog_debug("%s: undersized (%u B) lsa", __func__,
uint16_t length = 0;
int sum = 0;
- lsah = (struct ospf6_lsa_header *)lsa->header;
+ lsah = lsa->header;
if (ntohs(lsah->length) <= OSPF6_LSA_HEADER_SIZE) {
if (IS_DEBUG_OSPF6_GR)
zlog_debug("%s: undersized (%u B) lsa", __func__,
static void sharp_srv6_locator_chunk_free(struct prefix_ipv6 *chunk)
{
- prefix_ipv6_free((struct prefix_ipv6 **)&chunk);
+ prefix_ipv6_free(&chunk);
}
DEFPY (sharp_srv6_manager_get_locator_chunk,
struct nlmsghdr n;
struct tcmsg t;
char buf[0];
- } *req = (void *)data;
+ } *req = data;
if (datalen < sizeof(*req))
return 0;
struct nlmsghdr n;
struct tcmsg t;
char buf[0];
- } *req = (void *)data;
+ } *req = data;
if (datalen < sizeof(*req))
return 0;
struct nlmsghdr n;
struct tcmsg t;
char buf[0];
- } *req = (void *)data;
+ } *req = data;
if (datalen < sizeof(*req))
return 0;