diff options
author | Pau Espin Pedrol <pespin@sysmocom.de> | 2022-05-04 16:09:59 +0200 |
---|---|---|
committer | Pau Espin Pedrol <pespin@sysmocom.de> | 2022-05-05 14:51:13 +0200 |
commit | 7d621e0a79e940864cc3d3d4a057ccea9aeeb64a (patch) | |
tree | 4ac7077c0f016d2d0ac0620d2500459a7326656a /src/osmo-bsc/nm_bts_fsm.c | |
parent | 7cedfd4a4478028743404ef59b93162772e1cf0d (diff) |
constify state pointers of struct gsm_nm_state
This makes sure code accessing those fields is not changing its values,
since it would make no sense to change those. Follow up commit will make
convert those pointers to be full structs instead, as there's no need to
have pointers there.
Change-Id: I9979e62eac861e25bbe2161ab187ddb2b40fd097
Diffstat (limited to 'src/osmo-bsc/nm_bts_fsm.c')
-rw-r--r-- | src/osmo-bsc/nm_bts_fsm.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/osmo-bsc/nm_bts_fsm.c b/src/osmo-bsc/nm_bts_fsm.c index 7e8228164..5216ec8a4 100644 --- a/src/osmo-bsc/nm_bts_fsm.c +++ b/src/osmo-bsc/nm_bts_fsm.c @@ -59,7 +59,7 @@ static void st_op_disabled_notinstalled_on_enter(struct osmo_fsm_inst *fi, uint3 static void st_op_disabled_notinstalled(struct osmo_fsm_inst *fi, uint32_t event, void *data) { struct nm_statechg_signal_data *nsd; - struct gsm_nm_state *new_state; + const struct gsm_nm_state *new_state; switch (event) { case NM_EV_SW_ACT_REP: @@ -88,7 +88,7 @@ static void st_op_disabled_notinstalled(struct osmo_fsm_inst *fi, uint32_t event } } -static void configure_loop(struct gsm_bts *bts, struct gsm_nm_state *state, bool allow_opstart) +static void configure_loop(struct gsm_bts *bts, const struct gsm_nm_state *state, bool allow_opstart) { struct msgb *msgb; @@ -164,7 +164,7 @@ static void st_op_disabled_dependency(struct osmo_fsm_inst *fi, uint32_t event, { struct gsm_bts *bts = (struct gsm_bts *)fi->priv; struct nm_statechg_signal_data *nsd; - struct gsm_nm_state *new_state; + const struct gsm_nm_state *new_state; switch (event) { case NM_EV_GET_ATTR_REP: @@ -216,7 +216,7 @@ static void st_op_disabled_offline(struct osmo_fsm_inst *fi, uint32_t event, voi { struct gsm_bts *bts = (struct gsm_bts *)fi->priv; struct nm_statechg_signal_data *nsd; - struct gsm_nm_state *new_state; + const struct gsm_nm_state *new_state; switch (event) { case NM_EV_GET_ATTR_REP: @@ -280,7 +280,7 @@ static void st_op_enabled_on_enter(struct osmo_fsm_inst *fi, uint32_t prev_state static void st_op_enabled(struct osmo_fsm_inst *fi, uint32_t event, void *data) { struct nm_statechg_signal_data *nsd; - struct gsm_nm_state *new_state; + const struct gsm_nm_state *new_state; switch (event) { case NM_EV_STATE_CHG_REP: |