summaryrefslogtreecommitdiff
path: root/bgpd/rfapi/rfapi_rib.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@nvidia.com>2022-07-08 20:53:43 -0400
committerDonald Sharp <sharpd@nvidia.com>2022-07-19 13:54:10 -0400
commit04fd828f3fec7b76be6de73eafc5af081c3b4714 (patch)
tree84c5ddabcbbb458800ce9d4a1345019a9277a9f5 /bgpd/rfapi/rfapi_rib.c
parent3f22218b48807e3d5fa4a041536f65e5352f358b (diff)
bgpd: rfapi code does not need to assert on memory allocations
cleanup memory allocations asserting that it didn't fail as well as clean up some thread shenanigans. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Diffstat (limited to 'bgpd/rfapi/rfapi_rib.c')
-rw-r--r--bgpd/rfapi/rfapi_rib.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/bgpd/rfapi/rfapi_rib.c b/bgpd/rfapi/rfapi_rib.c
index 44eebe961c..c4fc96f5ae 100644
--- a/bgpd/rfapi/rfapi_rib.c
+++ b/bgpd/rfapi/rfapi_rib.c
@@ -357,10 +357,9 @@ static void rfapiRibStartTimer(struct rfapi_descriptor *rfd,
vnc_zlog_debug_verbose("%s: rfd %p pfx %pRN life %u", __func__, rfd, rn,
ri->lifetime);
- ri->timer = NULL;
+
thread_add_timer(bm->master, rfapiRibExpireTimer, tcb, ri->lifetime,
&ri->timer);
- assert(ri->timer);
}
extern void rfapi_rib_key_init(struct prefix *prefix, /* may be NULL */
@@ -1179,7 +1178,6 @@ callback:
new = XCALLOC(MTYPE_RFAPI_NEXTHOP,
sizeof(struct rfapi_next_hop_entry));
- assert(new);
if (ri->rk.aux_prefix.family) {
rfapiQprefix2Rprefix(&ri->rk.aux_prefix,
@@ -1269,7 +1267,6 @@ callback:
new = XCALLOC(
MTYPE_RFAPI_NEXTHOP,
sizeof(struct rfapi_next_hop_entry));
- assert(new);
if (ri->rk.aux_prefix.family) {
rfapiQprefix2Rprefix(&ri->rk.aux_prefix,
@@ -1718,7 +1715,6 @@ void rfapiRibUpdatePendingNode(
urq = XCALLOC(MTYPE_RFAPI_UPDATED_RESPONSE_QUEUE,
sizeof(struct rfapi_updated_responses_queue));
- assert(urq);
if (!rfd->updated_responses_queue)
updated_responses_queue_init(rfd);