FS-11903: Fix errors reported by PVS-Studio Static Code Analyzer for switch_core_io.c

This commit is contained in:
Andrey Volk 2019-07-12 20:40:35 +04:00
parent f245196e82
commit 21f9c47dd5
1 changed files with 5 additions and 5 deletions

View File

@ -669,7 +669,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_read_frame(switch_core_sessi
continue;
}
if (ok && switch_test_flag(bp, SMBF_READ_REPLACE)) {
if (switch_test_flag(bp, SMBF_READ_REPLACE)) {
do_bugs = 0;
if (bp->callback) {
bp->read_replace_frame_in = read_frame;
@ -720,7 +720,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_read_frame(switch_core_sessi
continue;
}
if (ok && bp->ready && switch_test_flag(bp, SMBF_READ_STREAM)) {
if (bp->ready && switch_test_flag(bp, SMBF_READ_STREAM)) {
switch_mutex_lock(bp->read_mutex);
if (bp->read_demux_frame) {
uint8_t data[SWITCH_RECOMMENDED_BUFFER_SIZE];
@ -755,7 +755,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_read_frame(switch_core_sessi
}
}
if (do_bugs || tap_only) {
if (do_bugs) {
goto done;
}
@ -985,12 +985,12 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_recv_dtmf(switch_core_sessio
return SWITCH_STATUS_FALSE;
}
switch_assert(dtmf);
if (switch_test_flag(dtmf, DTMF_FLAG_SENSITIVE)) {
return SWITCH_STATUS_SUCCESS;
}
switch_assert(dtmf);
new_dtmf = *dtmf;
if (new_dtmf.duration > switch_core_max_dtmf_duration(0)) {