From 3eb7a8495e6d2304de1bd6c34bb8f83949b2d8ca Mon Sep 17 00:00:00 2001 From: Chirag Shah Date: Mon, 12 Jun 2017 13:17:28 -0700 Subject: [PATCH] ospfd: ospf bandwidth handling Handle proper indent and insert missing not statement. Signed-off-by: Chirag Shah --- ospfd/ospf_interface.c | 4 +--- ospfd/ospf_zebra.c | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/ospfd/ospf_interface.c b/ospfd/ospf_interface.c index 2c270c5ca2..85f294966c 100644 --- a/ospfd/ospf_interface.c +++ b/ospfd/ospf_interface.c @@ -59,12 +59,10 @@ ospf_if_get_output_cost (struct ospf_interface *oi) u_int32_t cost; u_int32_t bw, refbw; - if (oi->ifp->bandwidth) - bw = oi->ifp->bandwidth; if (!oi->ifp->bandwidth && oi->ifp->speed) bw = oi->ifp->speed; else - bw = OSPF_DEFAULT_BANDWIDTH; + bw = oi->ifp->bandwidth ? oi->ifp->bandwidth : OSPF_DEFAULT_BANDWIDTH; refbw = oi->ospf->ref_bandwidth; /* A specifed ip ospf cost overrides a calculated one. */ diff --git a/ospfd/ospf_zebra.c b/ospfd/ospf_zebra.c index eb6b09c88c..d0747e1ad0 100644 --- a/ospfd/ospf_zebra.c +++ b/ospfd/ospf_zebra.c @@ -189,7 +189,7 @@ ospf_interface_state_up (int command, struct zclient *zclient, if (IS_DEBUG_OSPF (zebra, ZEBRA_INTERFACE)) zlog_debug ("Zebra: Interface[%s] state udpate speed change %u -> %u bw change %d -> %d.", - ifp->name, if_tmp.speed, ifp->speed, if_tmp.bandwidth, ifp->bandwidth); + ifp->name, if_tmp.speed, ifp->speed, if_tmp.bandwidth, ifp->bandwidth); ospf_if_recalculate_output_cost (ifp); -- 2.39.5