From 7aa77e557b133f3d745c012241fbad24e4b89ea0 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Thu, 16 Jun 2022 15:16:21 -0400 Subject: [PATCH] ospf6d: cost is uint32_t so it cannot be greater than UINT32_MAX Remove the extra test. Signed-off-by: Donald Sharp --- ospf6d/ospf6_interface.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/ospf6d/ospf6_interface.c b/ospf6d/ospf6_interface.c index 2a503c6233..efa5d2b7ab 100644 --- a/ospf6d/ospf6_interface.c +++ b/ospf6d/ospf6_interface.c @@ -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; -- 2.39.5