mirror of https://gerrit.osmocom.org/libosmocore
osmo_fsm_state_name: make robust against NULL fi
Change-Id: I61d4f7dfada2763948f330745ac886405d889a12
This commit is contained in:
parent
7740d26d7e
commit
56632b69a7
|
@ -220,7 +220,7 @@ const char *osmo_fsm_state_name(struct osmo_fsm *fsm, uint32_t state);
|
||||||
|
|
||||||
/*! return the name of the state the FSM instance is currently in. */
|
/*! 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)
|
static inline const char *osmo_fsm_inst_state_name(struct osmo_fsm_inst *fi)
|
||||||
{ return osmo_fsm_state_name(fi->fsm, fi->state); }
|
{ return fi ? osmo_fsm_state_name(fi->fsm, fi->state) : "NULL"; }
|
||||||
|
|
||||||
/*! perform a state change of the given FSM instance
|
/*! perform a state change of the given FSM instance
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in New Issue