[mod_sofia] scan-build: sofia_receive_message(). Value stored to 'to_tag' during its initialization is never read (#3277)

This commit is contained in:
Andrey Volk authored and GitHub committed 2026-11-09 21:53:18 +03:00
1 parent 9c48aa3f05
commit fa67e000bf
1 file changed
+1 -2
+1 -2
View File
@@ -2506,8 +2506,7 @@ static switch_status_t sofia_receive_message(switch_core_session_t *session, swi
/* Set sip_to_tag to local tag for inbound channels. */
if (switch_channel_direction(channel) == SWITCH_CALL_DIRECTION_INBOUND) {
const char* to_tag = "";
to_tag = switch_str_nil(nta_leg_get_tag(nua_get_dialog_state_leg(tech_pvt->nh)));
const char *to_tag = switch_str_nil(nta_leg_get_tag(nua_get_dialog_state_leg(tech_pvt->nh)));
if(to_tag) {
switch_channel_set_variable(channel, "sip_to_tag", to_tag);
}