From 537d8ea92bbf96086e03a0da5a7d26ee4b92e0cc Mon Sep 17 00:00:00 2001 From: paul Date: Wed, 27 Aug 2003 06:45:32 +0000 Subject: 2003-08-27 Jay Fenlason * bgpd/bgp_routemap.c: attr->med is type u_in32_t, should be compared with UINT32_MAX * ospfd/ospfd.c: remove redundant assert * zebra/rtadv.c: add missing include for zebra/rib.h --- bgpd/bgp_routemap.c | 12 ++++++------ ospfd/ospfd.c | 3 +-- zebra/rtadv.c | 1 + 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/bgpd/bgp_routemap.c b/bgpd/bgp_routemap.c index 9bc4e6d5..a2923fb1 100644 --- a/bgpd/bgp_routemap.c +++ b/bgpd/bgp_routemap.c @@ -879,17 +879,17 @@ route_set_metric (void *rule, struct prefix *prefix, if (strncmp (metric, "+", 1) == 0) { - if (bgp_info->attr->med/2 + metric_val/2 > ULONG_MAX/2) - bgp_info->attr->med = ULONG_MAX-1; + if (bgp_info->attr->med/2 + metric_val/2 > UINT32_MAX/2) + bgp_info->attr->med = UINT32_MAX-1; else - bgp_info->attr->med += metric_val; + bgp_info->attr->med += metric_val; } else if (strncmp (metric, "-", 1) == 0) { - if (bgp_info->attr->med <= metric_val) - bgp_info->attr->med = 0; + if (bgp_info->attr->med <= metric_val) + bgp_info->attr->med = 0; else - bgp_info->attr->med -= metric_val; + bgp_info->attr->med -= metric_val; } } } diff --git a/ospfd/ospfd.c b/ospfd/ospfd.c index 4418c777..aeae8e13 100644 --- a/ospfd/ospfd.c +++ b/ospfd/ospfd.c @@ -765,8 +765,7 @@ ospf_network_run (struct ospf *ospf, struct prefix *p, struct ospf_area *area) && ! ospf_if_is_configured (ospf, &(addr->u.prefix4)) && ospf_network_match_iface(co,p)) { - struct ospf_interface *oi; - assert(co); + struct ospf_interface *oi; oi = ospf_if_new (ospf, ifp, co->address); oi->connected = co; diff --git a/zebra/rtadv.c b/zebra/rtadv.c index a6e2d920..f7d336ca 100644 --- a/zebra/rtadv.c +++ b/zebra/rtadv.c @@ -35,6 +35,7 @@ #include "zebra/rtadv.h" #include "zebra/debug.h" #include "zebra/zserv.h" +#include "zebra/rib.h" extern struct zebra_privs_t zserv_privs; -- cgit v1.2.1