提交 21f9c47d authored 作者: Andrey Volk's avatar Andrey Volk

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

上级 f245196e
...@@ -669,7 +669,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_read_frame(switch_core_sessi ...@@ -669,7 +669,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_read_frame(switch_core_sessi
continue; continue;
} }
if (ok && switch_test_flag(bp, SMBF_READ_REPLACE)) { if (switch_test_flag(bp, SMBF_READ_REPLACE)) {
do_bugs = 0; do_bugs = 0;
if (bp->callback) { if (bp->callback) {
bp->read_replace_frame_in = read_frame; bp->read_replace_frame_in = read_frame;
...@@ -720,7 +720,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_read_frame(switch_core_sessi ...@@ -720,7 +720,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_read_frame(switch_core_sessi
continue; 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); switch_mutex_lock(bp->read_mutex);
if (bp->read_demux_frame) { if (bp->read_demux_frame) {
uint8_t data[SWITCH_RECOMMENDED_BUFFER_SIZE]; uint8_t data[SWITCH_RECOMMENDED_BUFFER_SIZE];
...@@ -755,7 +755,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_read_frame(switch_core_sessi ...@@ -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; goto done;
} }
...@@ -985,12 +985,12 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_recv_dtmf(switch_core_sessio ...@@ -985,12 +985,12 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_recv_dtmf(switch_core_sessio
return SWITCH_STATUS_FALSE; return SWITCH_STATUS_FALSE;
} }
switch_assert(dtmf);
if (switch_test_flag(dtmf, DTMF_FLAG_SENSITIVE)) { if (switch_test_flag(dtmf, DTMF_FLAG_SENSITIVE)) {
return SWITCH_STATUS_SUCCESS; return SWITCH_STATUS_SUCCESS;
} }
switch_assert(dtmf);
new_dtmf = *dtmf; new_dtmf = *dtmf;
if (new_dtmf.duration > switch_core_max_dtmf_duration(0)) { if (new_dtmf.duration > switch_core_max_dtmf_duration(0)) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论