]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
[mod_conference] Fix dead nested assignments
authorAndrey Volk <andywolk@gmail.com>
Thu, 6 Jan 2022 17:54:33 +0000 (20:54 +0300)
committerAndrey Volk <andywolk@gmail.com>
Tue, 9 Aug 2022 21:18:18 +0000 (00:18 +0300)
src/mod/applications/mod_conference/conference_api.c
src/mod/applications/mod_conference/conference_event.c
src/mod/applications/mod_conference/conference_member.c
src/mod/applications/mod_conference/mod_conference.c

index bd24484928c4ab4f6a5f85f74821d88c4f4de19e..8bcfc5862fb860c002a3d9f27e1829fb237dee0b 100644 (file)
@@ -2020,7 +2020,6 @@ switch_status_t conference_api_sub_vid_layout(conference_obj_t *conference, swit
        }
 
        if (!strncasecmp(argv[2], "group", 5)) {
-               layout_group_t *lg = NULL;
                int xx = 4;
 
                if ((group_name = strchr(argv[2], ':'))) {
@@ -2034,7 +2033,7 @@ switch_status_t conference_api_sub_vid_layout(conference_obj_t *conference, swit
                        stream->write_function(stream, "-ERR Group name not specified.\n");
                        return SWITCH_STATUS_SUCCESS;
                } else {
-                       if (((lg = switch_core_hash_find(conference->layout_group_hash, group_name)))) {
+                       if (switch_core_hash_find(conference->layout_group_hash, group_name)) {
                                if (conference_utils_test_flag(conference, CFLAG_PERSONAL_CANVAS)) {
                                        stream->write_function(stream, "-ERR Change personal canvas to layout group [%s]\n", group_name);
                                        conference->video_layout_group = switch_core_strdup(conference->pool, group_name);
index 23adb127a8c90e7c3a7cb2bbab90dab664b4222b..a88a5feab9b79b67bc3fe257b9d01754b3fdebd9 100644 (file)
@@ -305,7 +305,7 @@ void conference_event_mod_channel_handler(const char *event_channel, cJSON *json
        } else if (!strcasecmp(action, "shift-click-layer")) {
        } else if (!strcasecmp(action, "reset-layer") || !strcasecmp(action, "layer-pan-x") || !strcasecmp(action, "layer-pan-y")) {
                cJSON *v;
-               int layer_id = 0, canvas_id = 0, metric = 0, absolute = 0;
+               int layer_id = 0, canvas_id = 0, metric = 0;
                const char *i = "i", *xy = "";
 
                if ((v = cJSON_GetObjectItem(data, "layerID"))) {
@@ -321,7 +321,7 @@ void conference_event_mod_channel_handler(const char *event_channel, cJSON *json
                }
 
                if ((v = cJSON_GetObjectItem(data, "absolute"))) {
-                       if ((absolute = v->valueint)) {
+                       if (v->valueint) {
                                i = "";
                        }
                }
index 6df96fca9719aa32aeb351faa69432146dc60d52..6112a2890c89fdc0b1df33a1b886f7ca43dc27aa 100644 (file)
@@ -592,7 +592,7 @@ void conference_member_add_file_data(conference_member_t *member, int16_t *data,
                                if (switch_core_speech_read_tts(member->fnode->sh, file_frame, &speech_len, &flags) == SWITCH_STATUS_SUCCESS) {
                                        file_sample_len = file_data_len / 2 / member->conference->channels;
                                } else {
-                                       file_sample_len = file_data_len = 0;
+                                       file_sample_len = 0;
                                }
                        } else if (member->fnode->type == NODE_TYPE_FILE) {
                                switch_core_file_read(&member->fnode->fh, file_frame, &file_sample_len);
index d6cdab6ef7851e7a55494d3d364e864a6bbcfe48..619cd8c4a618933cd03137847fad7821ea7446ce 100644 (file)
@@ -490,7 +490,7 @@ void *SWITCH_THREAD_FUNC conference_thread_run(switch_thread_t *thread, void *ob
 
 
                                        } else {
-                                               file_sample_len = file_data_len = 0;
+                                               file_sample_len = 0;
                                        }
                                } else if (conference->fnode->type == NODE_TYPE_FILE) {
                                        switch_core_file_read(&conference->fnode->fh, file_frame, &file_sample_len);
@@ -1891,7 +1891,6 @@ switch_status_t conference_text_thread_callback(switch_core_session_t *session,
 /* Application interface function that is called from the dialplan to join the channel to a conference */
 SWITCH_STANDARD_APP(conference_function)
 {
-       switch_codec_t *read_codec = NULL;
        //uint32_t flags = 0;
        conference_member_t member = { 0 };
        conference_obj_t *conference = NULL;
@@ -1931,7 +1930,7 @@ SWITCH_STANDARD_APP(conference_function)
        }
 
        /* Save the original read codec. */
-       if (!(read_codec = switch_core_session_get_read_codec(session))) {
+       if (!switch_core_session_get_read_codec(session)) {
                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Channel has no media!\n");
                goto end;
        }