Merge pull request #419 from dragos-oancea/mod_unimrcp-val-never-read

[mod_unimrcp] scan-build: Value stored to 'lname' is never read - audio_queue_create()
This commit is contained in:
Andrey Volk 2020-02-26 23:36:18 +04:00 committed by GitHub
commit 462e946320
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 7 deletions

View File

@ -626,19 +626,13 @@ static switch_status_t audio_queue_create(audio_queue_t ** audio_queue, const ch
#ifdef MOD_UNIMRCP_DEBUG_AUDIO_QUEUE
int flags;
#endif
char *lname = "";
char *lname;
char *lsession_uuid = NULL;
*audio_queue = NULL;
lname = zstr(name) ? "" : switch_core_strdup(pool, name);
lsession_uuid = zstr(session_uuid) ? NULL : switch_core_strdup(pool, session_uuid);
if (zstr(name)) {
lname = "";
} else {
lname = switch_core_strdup(pool, name);
}
if ((laudio_queue = (audio_queue_t *) switch_core_alloc(pool, sizeof(audio_queue_t))) == NULL) {
switch_log_printf(SWITCH_CHANNEL_UUID_LOG(lsession_uuid), SWITCH_LOG_ERROR, "(%s) unable to create audio queue\n", lname);
status = SWITCH_STATUS_FALSE;