]> git.puffer.fish Git - mirror/frr.git/commitdiff
ospf6d: cost is uint32_t so it cannot be greater than UINT32_MAX
authorDonald Sharp <sharpd@nvidia.com>
Thu, 16 Jun 2022 19:16:21 +0000 (15:16 -0400)
committerDonald Sharp <sharpd@nvidia.com>
Thu, 16 Jun 2022 20:31:35 +0000 (16:31 -0400)
Remove the extra test.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
ospf6d/ospf6_interface.c

index 2a503c62334856369e903dd423af71facca36b7e..efa5d2b7ab91392ea02a4300d48a36594724efef 100644 (file)
@@ -165,8 +165,6 @@ static uint32_t ospf6_interface_get_cost(struct ospf6_interface *oi)
                cost = (uint32_t)((double)refbw / (double)bw + (double)0.5);
                if (cost < 1)
                        cost = 1;
-               else if (cost > UINT32_MAX)
-                       cost = UINT32_MAX;
        }
 
        return cost;