This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
pespin gerrit-no-reply at lists.osmocom.orgpespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bts/+/25941 ) Change subject: bts-trx: sched_lchan_pdtch: Refactor tx_pdtch_fn to get rid of goto tag ...................................................................... bts-trx: sched_lchan_pdtch: Refactor tx_pdtch_fn to get rid of goto tag With this change the error case is moved at the end of the function, which is more usual. At the same time, one goto tag can be removed, simplifying the function. Change-Id: Ifbd95ccbebf4d810b1fe0a162722e63fe69106b8 --- M src/osmo-bts-trx/sched_lchan_pdtch.c 1 file changed, 11 insertions(+), 12 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/41/25941/1 diff --git a/src/osmo-bts-trx/sched_lchan_pdtch.c b/src/osmo-bts-trx/sched_lchan_pdtch.c index 17523e1..4c63acb 100644 --- a/src/osmo-bts-trx/sched_lchan_pdtch.c +++ b/src/osmo-bts-trx/sched_lchan_pdtch.c @@ -161,20 +161,11 @@ /* get mac block from queue */ msg = _sched_dequeue_prim(l1ts, br); - if (msg) - goto got_msg; - - LOGL1SB(DL1P, LOGL_INFO, l1ts, br, "No prim for transmit.\n"); - -no_msg: - /* free burst memory */ - if (*bursts_p) { - talloc_free(*bursts_p); - *bursts_p = NULL; + if (!msg) { + LOGL1SB(DL1P, LOGL_INFO, l1ts, br, "No prim for transmit.\n"); + goto no_msg; } - return -ENODEV; -got_msg: /* BURST BYPASS */ /* allocate burst memory, if not already */ @@ -229,4 +220,12 @@ LOGL1SB(DL1P, LOGL_DEBUG, l1ts, br, "Transmitting burst=%u.\n", br->bid); return 0; + +no_msg: + /* free burst memory */ + if (*bursts_p) { + talloc_free(*bursts_p); + *bursts_p = NULL; + } + return -ENODEV; } -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/25941 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: Ifbd95ccbebf4d810b1fe0a162722e63fe69106b8 Gerrit-Change-Number: 25941 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin at sysmocom.de> Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20211025/b69aeb9f/attachment.htm>