From: Andrey Volk Date: Thu, 6 Jan 2022 17:16:26 +0000 (+0300) Subject: [mod_callcenter] Fix dead nested assignments in cc_config_api_function X-Git-Tag: v1.10.8^2~23 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=716a21b0b55185a122653f8687dbdaa7eaeeb520;p=thirdparty%2Ffreeswitch.git [mod_callcenter] Fix dead nested assignments in cc_config_api_function --- diff --git a/src/mod/applications/mod_callcenter/mod_callcenter.c b/src/mod/applications/mod_callcenter/mod_callcenter.c index cba6dc84f4..7c625126e4 100644 --- a/src/mod/applications/mod_callcenter/mod_callcenter.c +++ b/src/mod/applications/mod_callcenter/mod_callcenter.c @@ -3820,8 +3820,7 @@ SWITCH_STANDARD_API(cc_config_api_function) goto done; } else { const char *queue_name = argv[0 + initial_argc]; - cc_queue_t *queue = NULL; - if ((queue = load_queue(queue_name, SWITCH_TRUE, SWITCH_TRUE, NULL))) { + if (load_queue(queue_name, SWITCH_TRUE, SWITCH_TRUE, NULL)) { stream->write_function(stream, "%s", "+OK\n"); } else { stream->write_function(stream, "%s", "-ERR Invalid Queue not found!\n"); @@ -3845,9 +3844,8 @@ SWITCH_STANDARD_API(cc_config_api_function) goto done; } else { const char *queue_name = argv[0 + initial_argc]; - cc_queue_t *queue = NULL; destroy_queue(queue_name); - if ((queue = load_queue(queue_name, SWITCH_TRUE, SWITCH_TRUE, NULL))) { + if (load_queue(queue_name, SWITCH_TRUE, SWITCH_TRUE, NULL)) { stream->write_function(stream, "%s", "+OK\n"); } else { stream->write_function(stream, "%s", "-ERR Invalid Queue not found!\n");