summaryrefslogtreecommitdiffstats
path: root/ospf6d
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@nvidia.com>2022-06-16 21:16:21 +0200
committerDonald Sharp <sharpd@nvidia.com>2022-06-16 22:31:35 +0200
commit7aa77e557b133f3d745c012241fbad24e4b89ea0 (patch)
treea9ad96cf3d70039adbe9ddbb3072e818a7523b4f /ospf6d
parentnhrpd: r is always < 0 at some points of if else statements (diff)
downloadfrr-7aa77e557b133f3d745c012241fbad24e4b89ea0.tar.xz
frr-7aa77e557b133f3d745c012241fbad24e4b89ea0.zip
ospf6d: cost is uint32_t so it cannot be greater than UINT32_MAX
Remove the extra test. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Diffstat (limited to 'ospf6d')
-rw-r--r--ospf6d/ospf6_interface.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/ospf6d/ospf6_interface.c b/ospf6d/ospf6_interface.c
index 2a503c623..efa5d2b7a 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;