diff options
author | Vadim Yanitskiy <vyanitskiy@sysmocom.de> | 2022-07-29 00:06:48 +0700 |
---|---|---|
committer | Vadim Yanitskiy <vyanitskiy@sysmocom.de> | 2022-07-29 00:06:48 +0700 |
commit | b3e3a5d215fc4ec34c67e0a307830023a4f3176b (patch) | |
tree | eaea0af9600b484d7be6a534dc91ce8bea512641 | |
parent | 0893f0f631cf8fdd766201f1df7777dc1689aecd (diff) |
fsm: osmo_fsm_{event,inst,state}_name(): make *fi pointer const
Change-Id: I98cde213deb5a3bf39eb9f5e5451f40223632844
-rw-r--r-- | include/osmocom/core/fsm.h | 6 | ||||
-rw-r--r-- | src/fsm.c | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/include/osmocom/core/fsm.h b/include/osmocom/core/fsm.h index 77ebe7c1..5e5b091c 100644 --- a/include/osmocom/core/fsm.h +++ b/include/osmocom/core/fsm.h @@ -224,9 +224,9 @@ int osmo_fsm_inst_update_id(struct osmo_fsm_inst *fi, const char *id); int osmo_fsm_inst_update_id_f(struct osmo_fsm_inst *fi, const char *fmt, ...); int osmo_fsm_inst_update_id_f_sanitize(struct osmo_fsm_inst *fi, char replace_with, const char *fmt, ...); -const char *osmo_fsm_event_name(struct osmo_fsm *fsm, uint32_t event); -const char *osmo_fsm_inst_name(struct osmo_fsm_inst *fi); -const char *osmo_fsm_state_name(struct osmo_fsm *fsm, uint32_t state); +const char *osmo_fsm_event_name(const struct osmo_fsm *fsm, uint32_t event); +const char *osmo_fsm_inst_name(const struct osmo_fsm_inst *fi); +const char *osmo_fsm_state_name(const struct osmo_fsm *fsm, uint32_t state); /*! return the name of the state the FSM instance is currently in. */ static inline const char *osmo_fsm_inst_state_name(struct osmo_fsm_inst *fi) @@ -576,7 +576,7 @@ void osmo_fsm_inst_free(struct osmo_fsm_inst *fi) * \param[in] event Event integer value * \returns string rendering of the event */ -const char *osmo_fsm_event_name(struct osmo_fsm *fsm, uint32_t event) +const char *osmo_fsm_event_name(const struct osmo_fsm *fsm, uint32_t event) { static __thread char buf[32]; if (!fsm->event_names) { @@ -590,7 +590,7 @@ const char *osmo_fsm_event_name(struct osmo_fsm *fsm, uint32_t event) * \param[in] fi FSM instance * \returns string rendering of the FSM identity */ -const char *osmo_fsm_inst_name(struct osmo_fsm_inst *fi) +const char *osmo_fsm_inst_name(const struct osmo_fsm_inst *fi) { if (!fi) return "NULL"; @@ -606,7 +606,7 @@ const char *osmo_fsm_inst_name(struct osmo_fsm_inst *fi) * \param[in] state FSM state number * \returns string rendering of the FSM state */ -const char *osmo_fsm_state_name(struct osmo_fsm *fsm, uint32_t state) +const char *osmo_fsm_state_name(const struct osmo_fsm *fsm, uint32_t state) { static __thread char buf[32]; if (state >= fsm->num_states) { |