diff options
| author | Donatas Abraitis <donatas@opensourcerouting.org> | 2024-12-12 11:10:31 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-12-12 11:10:31 +0200 |
| commit | 492750f8bc422de83c008c94b4a7ce9a357a0a25 (patch) | |
| tree | 823bfebf66279b8ef3747f9a8c3ba97ad34b123a | |
| parent | 9ff0564d7d542120ebdec9c669e59838b6a6816a (diff) | |
| parent | 5d8bf74f0a5e28687630e9d1b35ac41db1af0efe (diff) | |
Merge pull request #17638 from donaldsharp/zebra_metaq_stuff
zebra: Remove tests for allocation failure
| -rw-r--r-- | zebra/zebra_rib.c | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/zebra/zebra_rib.c b/zebra/zebra_rib.c index 11d279d8c9..e64a620f00 100644 --- a/zebra/zebra_rib.c +++ b/zebra/zebra_rib.c @@ -3767,10 +3767,8 @@ static struct meta_queue *meta_queue_new(void) new = XCALLOC(MTYPE_WORK_QUEUE, sizeof(struct meta_queue)); - for (i = 0; i < MQ_SIZE; i++) { + for (i = 0; i < MQ_SIZE; i++) new->subq[i] = list_new(); - assert(new->subq[i]); - } return new; } @@ -3956,12 +3954,7 @@ void meta_queue_free(struct meta_queue *mq, struct zebra_vrf *zvrf) /* initialise zebra rib work queue */ static void rib_queue_init(void) { - if (!(zrouter.ribq = work_queue_new(zrouter.master, - "route_node processing"))) { - flog_err(EC_ZEBRA_WQ_NONEXISTENT, - "%s: could not initialise work queue!", __func__); - return; - } + zrouter.ribq = work_queue_new(zrouter.master, "route_node processing"); /* fill in the work queue spec */ zrouter.ribq->spec.workfunc = &meta_queue_process; @@ -3971,11 +3964,8 @@ static void rib_queue_init(void) zrouter.ribq->spec.hold = ZEBRA_RIB_PROCESS_HOLD_TIME; zrouter.ribq->spec.retry = ZEBRA_RIB_PROCESS_RETRY_TIME; - if (!(zrouter.mq = meta_queue_new())) { - flog_err(EC_ZEBRA_WQ_NONEXISTENT, - "%s: could not initialise meta queue!", __func__); - return; - } + zrouter.mq = meta_queue_new(); + return; } |
