]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
[core] scan-build: Value stored to 'status' is never read - switch_ivr_eavesdrop_sess... 347/head
authorDragos Oancea <dragos@signalwire.com>
Wed, 12 Feb 2020 21:54:33 +0000 (21:54 +0000)
committerDragos Oancea <dragos@signalwire.com>
Sat, 15 Feb 2020 18:10:26 +0000 (18:10 +0000)
src/switch_ivr_async.c

index 5753721fa36cb5f8d741eb269ded9675305cf079..3c5bc065f455306bedee51f279f32eeaef03e083 100644 (file)
@@ -2183,8 +2183,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_eavesdrop_session(switch_core_session
                        const char *group_name = switch_channel_get_variable(tchannel, "eavesdrop_group");
                        /* If we don't have a group, then return */
                        if (!group_name) {
-                               status = SWITCH_STATUS_BREAK;
-                               goto end;
+                               switch_goto_status(SWITCH_STATUS_BREAK, end);
                        }
                        /* Separate the group */
                        data = strdup(group_name);
@@ -2199,8 +2198,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_eavesdrop_session(switch_core_session
                        switch_safe_free(data);
                        /* If we didn't find any match, then end */
                        if (!ok) {
-                               status = SWITCH_STATUS_BREAK;
-                               goto end;
+                               switch_goto_status(SWITCH_STATUS_BREAK, end);
                        }
                }
 
@@ -2225,7 +2223,6 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_eavesdrop_session(switch_core_session
                                                                   SWITCH_CODEC_FLAG_ENCODE | SWITCH_CODEC_FLAG_DECODE,
                                                                   NULL, switch_core_session_get_pool(session)) != SWITCH_STATUS_SUCCESS) {
                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Cannot init codec\n");
-                       switch_core_session_rwunlock(tsession);
                        goto end;
                }
 
@@ -2585,8 +2582,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_eavesdrop_session(switch_core_session
                msg.message_id = SWITCH_MESSAGE_INDICATE_UNBRIDGE;
                switch_core_session_receive_message(session, &msg);
 
-
-
+               status = SWITCH_STATUS_SUCCESS;
          end:
 
                if (codec_initialized)
@@ -2611,7 +2607,6 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_eavesdrop_session(switch_core_session
                }
 
                switch_core_session_rwunlock(tsession);
-               status = SWITCH_STATUS_SUCCESS;
 
                switch_core_session_reset(session, SWITCH_TRUE, SWITCH_TRUE);
        }