tests: kernel: msgq: fix unused value
"ret" returned from k_msgq_put() should be checked. Coverity-CID: 160084 Change-Id: I192db3a67ab9489e8338f6636d4c2a6935e98d74 Signed-off-by: Sharron LIU <sharron.liu@intel.com>
This commit is contained in:
parent
ee659ae1a1
commit
cd35f06de8
1 changed files with 2 additions and 1 deletions
|
@ -37,6 +37,7 @@ void test_msgq_purge_when_put(void)
|
|||
/*fill the queue to full*/
|
||||
for (int i = 0; i < MSGQ_LEN; i++) {
|
||||
ret = k_msgq_put(&msgq, (void *)&data[i], K_NO_WAIT);
|
||||
assert_equal(ret, 0, NULL);
|
||||
}
|
||||
/*create another thread waiting to put msg*/
|
||||
k_tid_t tid = k_thread_spawn(tstack, STACK_SIZE,
|
||||
|
@ -51,6 +52,6 @@ void test_msgq_purge_when_put(void)
|
|||
/*verify msg put after purge*/
|
||||
for (int i = 0; i < MSGQ_LEN; i++) {
|
||||
ret = k_msgq_put(&msgq, (void *)&data[i], K_NO_WAIT);
|
||||
assert_false(ret, NULL);
|
||||
assert_equal(ret, 0, NULL);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue