[PATCH] osmo-bts[master]: cosmetic: Move error goto path to the end of the function

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/.

Pau Espin Pedrol gerrit-no-reply at lists.osmocom.org
Tue Jul 4 11:49:42 UTC 2017


Review at  https://gerrit.osmocom.org/3117

cosmetic: Move error goto path to the end of the function

Change-Id: I3ad15a9edbfe74de3deb7298441d54fd9d0178ad
---
M src/osmo-bts-trx/scheduler_trx.c
1 file changed, 9 insertions(+), 8 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/17/3117/1

diff --git a/src/osmo-bts-trx/scheduler_trx.c b/src/osmo-bts-trx/scheduler_trx.c
index 26b1705..967e3db 100644
--- a/src/osmo-bts-trx/scheduler_trx.c
+++ b/src/osmo-bts-trx/scheduler_trx.c
@@ -1549,14 +1549,7 @@
 	/* check if transceiver is still alive */
 	if (tcs->fn_without_clock_ind++ == TRX_LOSS_FRAMES) {
 		LOGP(DL1C, LOGL_NOTICE, "No more clock from transceiver\n");
-
-no_clock:
-		timer_ofd_disable(&tcs->fn_timer_ofd);
-		transceiver_available = 0;
-
-		bts_shutdown(bts, "No clock from osmo-trx");
-
-		return -1;
+		goto no_clock;
 	}
 
 	/* compute actual elapsed time and resulting OS scheduling error */
@@ -1583,6 +1576,14 @@
 	}
 
 	return 0;
+
+no_clock:
+	timer_ofd_disable(&tcs->fn_timer_ofd);
+	transceiver_available = 0;
+
+	bts_shutdown(bts, "No clock from osmo-trx");
+
+	return -1;
 }
 
 /*! reset clock with current fn and schedule it. Called when trx becomes

-- 
To view, visit https://gerrit.osmocom.org/3117
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3ad15a9edbfe74de3deb7298441d54fd9d0178ad
Gerrit-PatchSet: 1
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol <pespin at sysmocom.de>



More information about the gerrit-log mailing list