--- embedaddon/quagga/isisd/isis_route.c 2013/07/21 23:54:38 1.1.1.3 +++ embedaddon/quagga/isisd/isis_route.c 2016/11/02 10:09:10 1.1.1.4 @@ -50,7 +50,7 @@ #include "isis_zebra.h" static struct isis_nexthop * -isis_nexthop_create (struct in_addr *ip, unsigned int ifindex) +isis_nexthop_create (struct in_addr *ip, ifindex_t ifindex) { struct listnode *node; struct isis_nexthop *nexthop; @@ -67,10 +67,6 @@ isis_nexthop_create (struct in_addr *ip, unsigned int } nexthop = XCALLOC (MTYPE_ISIS_NEXTHOP, sizeof (struct isis_nexthop)); - if (!nexthop) - { - zlog_err ("ISIS-Rte: isis_nexthop_create: out of memory!"); - } nexthop->ifindex = ifindex; memcpy (&nexthop->ip, ip, sizeof (struct in_addr)); @@ -95,7 +91,7 @@ isis_nexthop_delete (struct isis_nexthop *nexthop) static int nexthoplookup (struct list *nexthops, struct in_addr *ip, - unsigned int ifindex) + ifindex_t ifindex) { struct listnode *node; struct isis_nexthop *nh; @@ -134,15 +130,11 @@ nexthops_print (struct list *nhs) #ifdef HAVE_IPV6 static struct isis_nexthop6 * -isis_nexthop6_new (struct in6_addr *ip6, unsigned int ifindex) +isis_nexthop6_new (struct in6_addr *ip6, ifindex_t ifindex) { struct isis_nexthop6 *nexthop6; nexthop6 = XCALLOC (MTYPE_ISIS_NEXTHOP6, sizeof (struct isis_nexthop6)); - if (!nexthop6) - { - zlog_err ("ISIS-Rte: isis_nexthop_create6: out of memory!"); - } nexthop6->ifindex = ifindex; memcpy (&nexthop6->ip6, ip6, sizeof (struct in6_addr)); @@ -152,7 +144,7 @@ isis_nexthop6_new (struct in6_addr *ip6, unsigned int } static struct isis_nexthop6 * -isis_nexthop6_create (struct in6_addr *ip6, unsigned int ifindex) +isis_nexthop6_create (struct in6_addr *ip6, ifindex_t ifindex) { struct listnode *node; struct isis_nexthop6 *nexthop6; @@ -189,7 +181,7 @@ isis_nexthop6_delete (struct isis_nexthop6 *nexthop6) static int nexthop6lookup (struct list *nexthops6, struct in6_addr *ip6, - unsigned int ifindex) + ifindex_t ifindex) { struct listnode *node; struct isis_nexthop6 *nh6; @@ -284,11 +276,6 @@ isis_route_info_new (struct prefix *prefix, uint32_t c struct listnode *node; rinfo = XCALLOC (MTYPE_ISIS_ROUTE_INFO, sizeof (struct isis_route_info)); - if (!rinfo) - { - zlog_err ("ISIS-Rte: isis_route_info_new: out of memory!"); - return NULL; - } if (prefix->family == AF_INET) { @@ -424,12 +411,6 @@ isis_route_create (struct prefix *prefix, u_int32_t co prefix2str (prefix, (char *) buff, BUFSIZ); rinfo_new = isis_route_info_new (prefix, cost, depth, adjacencies); - if (!rinfo_new) - { - zlog_err ("ISIS-Rte (%s): isis_route_create: out of memory!", - area->area_tag); - return NULL; - } if (family == AF_INET) route_node = route_node_get (area->route_table[level - 1], prefix);