[PATCH] mgcp/test: Fix mgcp-transcoding assertion (Coverity)

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/OpenBSC@lists.osmocom.org/.

Jacob Erlbeck jerlbeck at sysmocom.de
Mon Apr 27 07:13:48 UTC 2015


In test_rtp_seq_state an assignment is accidently done within an
assertion.

This commit changes that into a comparison as it was intended.

Fixes: Coverity CID 1295457, 1295458
Sponsored-by: On-Waves ehf
---
 openbsc/tests/mgcp/mgcp_transcoding_test.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/openbsc/tests/mgcp/mgcp_transcoding_test.c b/openbsc/tests/mgcp/mgcp_transcoding_test.c
index 1b8001e..c5c0a0b 100644
--- a/openbsc/tests/mgcp/mgcp_transcoding_test.c
+++ b/openbsc/tests/mgcp/mgcp_transcoding_test.c
@@ -295,7 +295,7 @@ static void test_rtp_seq_state(void)
 	OSMO_ASSERT(cont >= 0);
 	OSMO_ASSERT(state->is_running);
 	OSMO_ASSERT(state->next_seq == 2);
-	OSMO_ASSERT(state->next_time = 240);
+	OSMO_ASSERT(state->next_time == 240);
 
 	/* verify that the right timestamp was written */
 	OSMO_ASSERT(len == audio_packets_pcma[0].len);
-- 
1.9.1




More information about the OpenBSC mailing list