]> git.puffer.fish Git - matthieu/frr.git/commitdiff
bgpd: Use the actual pointer type instead of a void
authorDonald Sharp <sharpd@nvidia.com>
Mon, 10 Apr 2023 18:02:18 +0000 (14:02 -0400)
committerMergify <37929162+mergify[bot]@users.noreply.github.com>
Tue, 11 Apr 2023 06:36:08 +0000 (06:36 +0000)
Let's cut to the chase, we know the pointer type and
it allows us to not to some gyrations.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
(cherry picked from commit ef96e3753fe47de1edd0d5640bc30329ae55508a)

bgpd/bgp_mplsvpn.c

index fa9ea46e7ee52ecc22cf04e1169d23c164c86fc4..5d7aefa73645b790358d25375f81cd33c16fb80b 100644 (file)
@@ -815,7 +815,7 @@ leak_update(struct bgp *to_bgp, struct bgp_dest *bn,
        struct bgp_path_info *new;
        struct bgp_path_info_extra *extra;
        uint32_t num_sids = 0;
-       void *parent = source_bpi;
+       struct bgp_path_info *parent = source_bpi;
 
        if (new_attr->srv6_l3vpn || new_attr->srv6_vpn)
                num_sids = 1;
@@ -1017,7 +1017,7 @@ leak_update(struct bgp *to_bgp, struct bgp_dest *bn,
 
        new->extra->parent = bgp_path_info_lock(parent);
        bgp_dest_lock_node(
-               (struct bgp_dest *)((struct bgp_path_info *)parent)->net);
+               (struct bgp_dest *)parent->net);
        if (bgp_orig)
                new->extra->bgp_orig = bgp_lock(bgp_orig);
        if (nexthop_orig)