Change in osmo-bsc[master]: check for osmo_fsm_register() error return value

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

laforge gerrit-no-reply at lists.osmocom.org
Sun Dec 1 12:42:37 UTC 2019


laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/16359 )

Change subject: check for osmo_fsm_register() error return value
......................................................................

check for osmo_fsm_register() error return value

Change-Id: I77e8ace007a3d6b9c40d3e158d1cdb7576aab77b
---
M src/osmo-bsc/a_reset.c
M src/osmo-bsc/abis_om2000.c
2 files changed, 4 insertions(+), 4 deletions(-)

Approvals:
  Jenkins Builder: Verified
  laforge: Looks good to me, approved



diff --git a/src/osmo-bsc/a_reset.c b/src/osmo-bsc/a_reset.c
index 9e046be..bc41914 100644
--- a/src/osmo-bsc/a_reset.c
+++ b/src/osmo-bsc/a_reset.c
@@ -151,7 +151,7 @@
 
 	/* Register the fsm description (if not already done) */
 	if (osmo_fsm_find_by_name(fsm.name) != &fsm)
-		osmo_fsm_register(&fsm);
+		OSMO_ASSERT(osmo_fsm_register(&fsm) == 0);
 
 	/* Allocate and configure a new fsm instance */
 	reset_ctx = talloc_zero(msc, struct reset_ctx);
diff --git a/src/osmo-bsc/abis_om2000.c b/src/osmo-bsc/abis_om2000.c
index e6b06c3..14c373b 100644
--- a/src/osmo-bsc/abis_om2000.c
+++ b/src/osmo-bsc/abis_om2000.c
@@ -2764,7 +2764,7 @@
 
 static __attribute__((constructor)) void abis_om2k_init(void)
 {
-	osmo_fsm_register(&om2k_mo_fsm);
-	osmo_fsm_register(&om2k_bts_fsm);
-	osmo_fsm_register(&om2k_trx_fsm);
+	OSMO_ASSERT(osmo_fsm_register(&om2k_mo_fsm) == 0);
+	OSMO_ASSERT(osmo_fsm_register(&om2k_bts_fsm) == 0);
+	OSMO_ASSERT(osmo_fsm_register(&om2k_trx_fsm) == 0);
 }

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/16359
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I77e8ace007a3d6b9c40d3e158d1cdb7576aab77b
Gerrit-Change-Number: 16359
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge at osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20191201/a64e2ea8/attachment.htm>


More information about the gerrit-log mailing list