diff options
author | Max <msuraev@sysmocom.de> | 2018-12-19 19:47:26 +0100 |
---|---|---|
committer | Max <msuraev@sysmocom.de> | 2019-01-04 09:38:40 +0000 |
commit | f3bd838afcef1fabdff915cf87ae261ff031b1c8 (patch) | |
tree | befa748497bef891330b7955606882f66f0740ae | |
parent | 45867378f1def5ce15d09c8ad9a32dc9cc4aa57d (diff) |
LCLS: use enum values instead of magic numbers
Change-Id: I3f49f74edb5400df1b13bb75da3d524f234c8d03
Related: OS#3659
-rw-r--r-- | src/osmo-bsc/osmo_bsc_lcls.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/osmo-bsc/osmo_bsc_lcls.c b/src/osmo-bsc/osmo_bsc_lcls.c index 26b3244ae..2d5a077d6 100644 --- a/src/osmo-bsc/osmo_bsc_lcls.c +++ b/src/osmo-bsc/osmo_bsc_lcls.c @@ -50,11 +50,11 @@ struct value_string lcls_event_names[] = { 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 @@ static void lcls_send_notify(struct gsm_subscriber_connection *conn) 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 @@ static void lcls_no_lcls_fn(struct osmo_fsm_inst *fi, uint32_t event, void *data 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 @@ static void bssmap_add_lcls_status(struct msgb *msg, enum gsm0808_lcls_status st 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])); |