Change in osmo-bsc[master]: LCLS: use enum values instead of magic numbers

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

Max gerrit-no-reply at lists.osmocom.org
Wed Dec 19 18:58:34 UTC 2018


Max has uploaded this change for review. ( https://gerrit.osmocom.org/12378


Change subject: LCLS: use enum values instead of magic numbers
......................................................................

LCLS: use enum values instead of magic numbers

Change-Id: I3f49f74edb5400df1b13bb75da3d524f234c8d03
Related: OS#3659
---
M src/osmo-bsc/osmo_bsc_lcls.c
1 file changed, 5 insertions(+), 5 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/78/12378/1

diff --git a/src/osmo-bsc/osmo_bsc_lcls.c b/src/osmo-bsc/osmo_bsc_lcls.c
index 26b3244..2d5a077 100644
--- a/src/osmo-bsc/osmo_bsc_lcls.c
+++ b/src/osmo-bsc/osmo_bsc_lcls.c
@@ -50,11 +50,11 @@
 enum gsm0808_lcls_status lcls_get_status(struct gsm_subscriber_connection *conn)
 {
 	if (!conn->lcls.fi)
-		return 0xff;
+		return GSM0808_LCLS_STS_NA;
 
 	switch (conn->lcls.fi->state) {
 	case ST_NO_LCLS:
-		return 0xff;
+		return GSM0808_LCLS_STS_NA;
 	case ST_NOT_YET_LS:
 		return GSM0808_LCLS_STS_NOT_YET_LS;
 	case ST_NOT_POSSIBLE_LS:
@@ -76,7 +76,7 @@
 	enum gsm0808_lcls_status status = lcls_get_status(conn);
 	struct msgb *msg;
 
-	if (status == 0xff)
+	if (status == GSM0808_LCLS_STS_NA)
 		return;
 
 	LOGPFSM(conn->lcls.fi, "Sending BSSMAP LCLS NOTIFICATION (%s)\n",
@@ -384,7 +384,7 @@
 			return;
 		return;
 	case LCLS_EV_APPLY_CFG_CSC:
-		if (conn->lcls.config == 0xff)
+		if (conn->lcls.config == GSM0808_LCLS_CFG_NA)
 			return;
 		if (lcls_perform_correlation(conn) != 0) {
 			/* Correlation leads to no result: Not Possible to LS */
@@ -887,7 +887,7 @@
 void bssmap_add_lcls_status_if_needed(struct gsm_subscriber_connection *conn, struct msgb *msg)
 {
 	enum gsm0808_lcls_status status = lcls_get_status(conn);
-	if (status != 0xff) {
+	if (status != GSM0808_LCLS_STS_NA) {
 		LOGPFSM(conn->fi, "Adding LCLS BSS-Status (%s) to %s\n",
 			gsm0808_lcls_status_name(status),
 			gsm0808_bssmap_name(msg->l3h[2]));

-- 
To view, visit https://gerrit.osmocom.org/12378
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I3f49f74edb5400df1b13bb75da3d524f234c8d03
Gerrit-Change-Number: 12378
Gerrit-PatchSet: 1
Gerrit-Owner: Max <msuraev at sysmocom.de>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20181219/46dcc535/attachment.htm>


More information about the gerrit-log mailing list