GCC12: Fixes for 18+. state_id_by_topic comparing wrong value
GCC 12 caught an issue in state_id_by_topic where we were checking a pointer for NULL instead of the contents of the pointer for '\0'. ASTERISK-30044 Change-Id: Ia0b04d4fff45c92acb7f07132a33622fa341148e
This commit is contained in:
parent
efca7f4e8d
commit
dfd2e4006b
|
@ -113,7 +113,7 @@ static const char *state_id_by_topic(struct stasis_topic *manager_topic,
|
||||||
id = strchr(stasis_topic_name(state_topic), '/');
|
id = strchr(stasis_topic_name(state_topic), '/');
|
||||||
|
|
||||||
/* The state's unique id should always exist */
|
/* The state's unique id should always exist */
|
||||||
ast_assert(id != NULL && (id + 1) != NULL);
|
ast_assert(id != NULL && *(id + 1) != '\0');
|
||||||
|
|
||||||
return (id + 1);
|
return (id + 1);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue